I am working on a revision of objects.fs.
One change is that objects2.fs will no longer require that method
selectors are defined for an ancestor class of any class that wants to
be able to understand the selector (this enables duck typing).
As a consequence, the syntax changes, from: (preferredly) first
defining a selector, then methods and binding them to the selector;
to: defining method and defining/overriding the selector in one go.
An obvious candidate for the new syntax is:
m: <selector>
... <code> ... ;m
Unfortunately, objects.fs already has M: and ;M, and they behave
differently.
I now see two options for dealing with this:
1) Use M: and ;M and rename the old M: and ;M to something else; when
transitioning to objects2.fs, existing uses of M: and ;M would have to
be searched and replaced.
2) Use something other than M: and ;M for the new syntax.
In general I favour option 2 (I like backwards compatibility without
ado), but I don't have any good alternative names (:M is also taken in
objects.fs); what would be your suggestsion?
Also, to estimate the impact of option 1, let me know if you would be
affected and how much code you would have to change.
Thanks in advance.
- anton
--
M. Anton Ertl
http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs:
http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard:
http://www.forth200x.org/forth200x.html
EuroForth 2011:
http://www.euroforth.org/ef11/