On Fri, 2007-05-25 at 10:24 -0700, Erick Tryzelaar wrote: > We talked about this when skaller implemented "$$". I believe his reason > against "#syntax light" was that it was a global declaration, and he'd > prefer not to have them.
This is not quite the case: the first step is to get something local which is compatible with the existing free form, and which can switch TO free form when you have long lines in a natural way, i.e. not using stuff like trailing \ characters. Also, I wanted something which is entirely lexical, meaning it is independent of the syntax. In Haskell, the indent form is driven by particular keywords (do for example) and so doesn't extend naturally to user defined keywords .. also Felix has a lot more keywords at the moment. And we may want to switch some of them over to user defined syntax, now we have Dypgen. The current implementation has a small hack which allows you to write $$ in column zero to introduce top level indent form. However none of this is the same as #syntax light, because the use of $$ is NOT inherited by a nested block. You have to re-introduce the $$ for each block where you want to use indent lexicology. Note it isn't #syntax light. It is NOT the syntax which is being touched. The parser still sees { .. ; .. ; } symbols, they're *inserted* by a token filter. So, I believe I have reduced the problem now. We have a local, non-inherited, method with sensible invariants, and we want to extend that to one that is inherited, and also allow it to be specified globally. I really like Python's technique, of introducing indents with a trailing : character .. unfortunately : is already used in Felix.. Perhaps '..' is lighter: whilst x do .. nested although that should mean 'subrange' .. however here it is trailing, and subrange normally is used like (x..y). > I think that swapping between the space-sensitive > and space-insensitive in a file could get confusing. yes, but is necessary to switch FROM block form to free form when you have lines that are too long: you need a clear way to extend lines. In Python this is kind of messy, syntax dependent, and worse, it fails abysmally for """ style strings. -- 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