On Tue, 2007-05-08 at 15:19 +0100, Ben Smith wrote: > On 07/05/07, Erick Tryzelaar <[EMAIL PROTECTED]> wrote: > > 2. I'm not sure if this is LALR, but it'd be nice if we just had one > > terminator for all of our "endcase", "endif", and "endmatch" constructs. > > What if we just replaced them all with "end"? I do like "do"-"done", and > > I'd like to raise that up to roughly equal "begin"-"end" from ocaml. > > I don't really agree with this one... As long as you're going to use > words to bound your blocks, you might as well make them say clearly > what you're doing. If it's a matter of saving keywords, you could > simply use "end case", "end if" and "end match". That way you're > saving keywords _and_ not losing any clarity for people reading code > (or writing bad code...:)
I'm not interested in saving keywords as such. The way I look at it, keywords are really set in a distinct font. One language did this nicely: if: x then: y else: z Another way is _goto fred which C uses (_Complex is in C99). Two classes of English words shouldn't cause problems: 'funny' words like a the here there all each .. which are neither nouns nor verbs, where the user has no legitimate business using them for identifiers, and special words which do invade the users namespace but are fairly system specific, such as gc_pointer Anyhow I want to defer consideration of this, to see if we can get dypgen working. If so, we have an extensible GLR parser available, so that 'in principle' we only need enough grammar to define a grammar and suitable 'user actions' denoting semantics, eg statement: | "call" expr expr { call($1,$2) } | .... where call denotes an Ocaml coded AST term. I'm not sure how this will pan out, but it is appealing then to minimise the syntax, with a good fraction being for grammar specification, and the actual language stuff in the library. If we can 'open' syntax extensions along with data and functions in modules, we have DSSLs .. and we can move a lot of the sugar into the library, so the keywords will only have an impact if you use them. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- 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 Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language