Scott Moore wrote:
Dynamic arrays are pretty much what the whole issue is about. First, Oberon dispenses with the lower bound check, which I think is proper. Second, whenever you introduce a mix of dynamic and fixed arrays there are problems. If you specify a parameter as dynamic, convertions happen when called with a fixed, etc.
Schema formal parameters accept only schemata as actual parameters. There are no implicit conversions. (The only exceptions is for value parameters of type `String', to allow for actual parameters of a fixed string type (for backward compatibility) and string literals.)
Of course, when you plan to pass some data to a schematic argument, you must make it a schema, but I can't remember that I ever had such a problem where I didn't want to make it a schema, anyway (because the schema type is just the type I use for this particular structure). And I certainly never had to do a manual runtime conversion from a fixed array to a schema just to pass it as a parameter.
So these problems you keep referring to (I remember you said the same in a newsgroup discussion before) simply do not exist in practice.
Schemas fundamentally (and permanently) degrade Pascals runtime performance.
What do you mean permanently? It only affects code that uses schemata, other code is not affected.
As programmers get used to using schemas, it is permanent.
I'm trying to not take this personal, but believe me, I *can* decide when a fixed size will do and when not.
And again, what are your alternatives? When I use schemata for dynamic arrays, you have another implementation of dynamic arrays which surely also requires more runtime range checks.
Typically in a schema you must carry a pointer to a template (a runtime data structure describing the schema type to be accessed).
What makes you think so? We don't need a runtime type description. The compiler has such a description, but it's never output in any runtime form, so it cannot be used at runtime, not even accidentally.
If that's your main concern about schemata, you might want to point out why you think it's necessary so we can try to clarify things, instead of repeating assertions without any evidence or example which are hard to comment in a useful way.
I wonder if you have understood the schema concept at all if you actually think they're type-unsafe.
Anyway, I have some uses of schemata which are more then dynamic length arrays, but since you obviously don't care, I won't bother explaining.
I'm sorry you felt you needed to put this on a personal level. I am actually confused why you felt that was required, but I have had examples of it before. I think we are done. Kinda sad, really, we cannot have a reasonable conversation.
Yes, I remember. You're quick to take things personal. Just for the record, what exactly do you feel I put on a personal level? That you don't care about schemata? I think that's pretty clear from your comments. That you haven't completely understood the schema concept? That's not exactly a personal offense -- if you don't care for something, you don't need to understand it, of course. But it might be wiser to not publicly criticise something you don't really know. As this mail shows, you apparently have some misconceptions about schemata (automatic conversions from fixed types, need for runtime type descriptions). If you want to continue critizing things based on false information, indeed we cannot have a reasonable conversation.
If you're really interested, I could explain some things about schemata to you and how some situations can be handled efficiently. But if you begin with statements such as "This is necessary ..." and "That is impossible ...", while Waldek and I who actually worked on the implementation of schemata know better, it's kind of pointless ...
BTW, about the other points, I fully agree with Waldek's last mail.
Frank