[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: firstname.lastname@example.org
- Subject: some suggestions
- From: Ivan Moore <email@example.com>
- Date: Fri, 15 Jul 94 17:47:20 BST
- Resent-date: Fri, 15 Jul 94 10:19:23 PDT
- Resent-from: Urs Hoelzle <urs@otis>
- Resent-message-id: <9407151719.AA04958@otis.Stanford.EDU>
- Resent-to: real-self-interest
I have a few comments/suggestions - the result of struggling to write a
grammar for Self. It seems a shame to introduce inconsistencies because
of some seemingly arbitrary decisions about syntax.
You cant define '=' for the lobby (or anything that the lobby inherits from
- eg default behavior). If you try - Self crashes - stack overflow or something
This makes it somewhat tricky to define the necessary methods in defaultBehavior
so that everything that inherits from the lobby can be added to a set
(for example), which is somewhat annoying.
I realise that the lobby having '=' defined for it would lead to some strange
looking expressions being quite legal. For example:
'm = ( | f = = 10. t = = self | something )'
would result in the local slots f and t having the values true and false
respectively. Or 't = = self' would result in a read only slot t = true.
How about using something different to '=' for the things that
__arent_the_same__ as a message send '='?
'.' is used for different things - how about using something else
for the end of a statement - eg ';' and/or something different for delegation,
'^' and '|'
'^' and '|' have special meanings so they cant be used as operator names,
but '^^' and '||' can (but try to define a method '^^ x = ( x )' and you
get an error - whereas '^ ^^ x = ( x )' is OK.
PS - really this isnt just to make it easier for me to write a grammar -
its a matter of consistency in all things.