Monday, October 02, 2000, Jason van Zyl hath spoken:
> I wanted to change the syntax of directives from say
> #foreach $element in $list
> to
> #foreach ($element in $list)
> so I cleanly know what the elements of a directive
> are.
That is entirely appropriate if the stuff inside can be arbitrarily
long and complicated. The rule of thumb is basically, can a dumb
lexer "grep" all of this out. If not, it's probably too complicated
(heck, even humans have trouble when it's hard to lex).
C, C++ and Java do this though I'm not sure for the same reason. At
the least, it will be familiar. Another rule of thumb is to reduce
"astonishment" by not inventing new syntax unless you mean it to mean
something else or you're embedding somewhere that makes it impractical
to keep familiar syntax. So, again (...) is good.
+1 vote from Terence :)
Terence
--
Chief Scientist & Co-founder, http://www.jguru.com
Co-founder, http://www.NoWebPatents.org -- Stop Patent Stupidity
[EMAIL PROTECTED]