On 5/11/07, skaller <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-05-10 at 23:07 -0700, Erick Tryzelaar wrote:
>
> > Would it be LALR if we had a mandatory "end" but an optional thing
> > after, like these?
> >
> > module Act
> > class Base
> > def clone
> > stuff
> > end
> > end
> > end
> >
> > module Act
> > class Base
> > def clone
> > stuff
> > end
> > end Base
> > end
>
> Assuming free form (ignoring indents) then no, because
> this shows an ambiguity:
>
> class Base ... end Base = 1
>
> woops. Same here:
>
> class Base .. end class Base .. end
>
> woops!
>
Or with class Base ... end of Base
Assuming that of cannot starts a phrase.
> Throw in ';' and it is different:
>
> class Base ... end; Base =1;
> class Base .. end Base; ..
';' or having some layout thing saying that a newline terminate what's
"terminable".
# Ok
foo 1,
2
# Ok
1 +
2
# Here no args are given to foo
foo
1, 2
> etc. I wouldn't be using Ruby as an example of a good language.
> I have no idea why it became popular, since it is basically
> a stolen version of Python that made even more mess than
> Python does.
IMHO Ruby is a lot more consistent than Python which badly mix OO and
imperative styles.
> Syntax is contentious because some people, such as myself,
> read code wholistically by visual pattern matching, so the
> lexical marks, indentation style, and other layout stuff
> are quite critical to comprehension.
I think that one shouldn't sacrifice shortness of code. However one
can have better support in the language to dealing with large
programs.
> Languages that aren't flexible enough become overburdened
> with idioms, and those that are too flexible become
> too personalised for communication.
That's true, but having a flexible language also leads to idioms but
better one since the search space is larger.
Ruby is a good example for that. Ruby on Rails have used a lot it's
flexibility but finally leads to idioms, DSLs (even with the fixed
grammar of Ruby)...
> Stuff like the current #statement extensions are conservative:
> they don't allow arbitrary extension, they demand a lead-in
> keyword, they demand termination the same way as other statements,
> and they demand nesting of existing constructions.
Keeping that kind of consistency is really a good property.
--
Nicolas Pouillard
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language