We have no done in TObject. And if you mean Free then there is a difference between calling Destroy directly and calling Free.
No, i'm saying this:
compiler option:
-Ss Constructor name must be init (destructor must be done) Orthogonality would kill this compiler option, but here is. Same for C'ish operators like +=,++ etc...
I'd suggest that adding a keyword (including custom operators) can be justified if the alternative is a non-intuitive overlay of an existing one: I'm thinking of TP's usage of "const" for static local variables here.
This is a good example. "Static" or "local" should be the keyword here or similar one.
Really const used as static local variable is really "tricky" and need compiler options to not get warnings.. It's well documented, but first time i would need one, i have to read manual carefully and was counter intuitive the actual solution. I think const* here is overloaded.
It's easy to get examples:
const: Overloaded (many uses) and counter intuitive in static local
object: confusing because it really means StackClass.
operators: taking pascal and allowing C'ish.
method: constructors with double syntax..
I do not say that this is bad. I simply say that some kind of "normative" FreePascal with one way to do things it's a desirable one as pointed PascalDragon. I agree fully with this. But, in the middle ground, i think that correctness, and saying correctness as the way to have at least one tool for devs to write intuitive, formal-academic naming, etc should be supported. (correctness as readability like Wirth's definition)
For above examples, it could imply (examples, not being hard thinking only for showing idea):
- const: Overloaded (many uses) and counter intuitive in static local
-> Make a Static or similar keyword and adopt these like in C. A common sample is that my C-student doesn't know that Pascal has it..
- object: confusing because it really means StackClass. ->
Bored of explaining really is a class.- operators: taking pascal and allowing Cish. -> Well, these are handy, i won't change these, but or we accept things like const/static in part one or we don't... Pascal enforces assignment with := (<-) and not to use foo++ but inc(foo) or foo:=foo+1;
- method: constructors/destructors with double syntax.. -> I would enforce one, and mark other as deprecated, but still acepted by compiler.
By the way, what i'm trying to say is that for many historical reasons, we have several ways/aproachs for doing same things. I think that it's not bad to make a "high mountain see" and look what is better, what is intuitive, what not, and go for these maintaining backward compatibility. I'm not saying breaking the toy, only enhacements.