>I am not shure, how you do that in SuperCard, but there are a lot of
>cases where the source would get much more readable, especially if some
>parameters are optional, and the parameters would not have to be in a
>fixed order any more.
>
>In AppleScript parameters can have "names" like "of", "with", etc.
>SmallTalk has (had?) also "named" parameters, but there parsing was
>easier, because these "names" have colons ("mycompare somevar with:
>someother").
>
>I'm looking forward to this feature, but it not really essentially
>important for advanced programmers, is it?
Scott, R�diger,
I don't see any reason not to add this feature to the official xTalk spec.
As R�diger already said, advanced programmers might prefer not using this
(since you can then tell apart built-in functionality from user handlers
and messages), but that's their personal freedom, and no reason to leave
out this feature. There's only one trouble spot I see:
What if unsupported syntax gets turned into a handler call? E.g. a program
called TroubleCard has support for English-like syntax as being discussed
since 1.0, and with 1.2 it introduces the if/then conditionals and boolean
operators. Now, someone opens a stack in 1.0 that was made to use 1.2's
features:
on openStack
if cd btn 5 contains "Steve" then play boing
end openStack
This would wrongly result in a message
if <cd btn 5's contents>,"contains","Steve","then","play","boing"
In this case this wouldn't be problematic, as the user is unlikely to have
an "if" message, and thus we'll get a "no such handler" message, but if
there was such a handler, we'd get surprising results in older versions.
It's something we should consider, and surely document. This is also a
reason why I think we need one or more of the following:
-> a property to turn off this feature
-> a message that is sent whenever a message is sent
-> a message that is sent whenever a message is not caught
The two messages would allow implementing one's own "Message Watcher"
window, and would also help in manually debugging such errors, while the
topmost could help people avoid this error if they don't want to use this
feature at all.
Cheers,
-- M. Uli Kusterer
------------------------------------------------------------
http://www.weblayout.com/witness
'The Witnesses of TeachText are everywhere...'
--- HELP SAVE HYPERCARD: ---
Details at: http://www.hyperactivesw.com/SaveHC.html
Sign: http://www.giguere.uqam.ca/petition/hcpetition.html