[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Code representation - just musing
- From: Adolf Mathias <dolfi@...>
- Date: Fri, 02 Feb 2001 08:15:40 +0000
Alan Watson wrote:
>
> > The main one I haven't seen on the list yet is making code first class. A
> > code block should be a table of statements, so instead of
> >
> > do ... end
> >
> > you write (in unsugared notation)
> >
> > { ... }
> >
> > This allows code to be manipulated by programs.
>
> I think this can be accomplished this by keeping an array of
> strings, modifying the strings as required, and then having
> a "dotable" function that concatenates the strings and then
> does a "dostring". It's not especially clean, but I think it
> covers all you need. Am I missing something?
Phantastic ideas - some of my thoughts
a block is either:
- a string containing Sol/Lua code
- a table containing a sequence of blocks
- a function application; how should that look?
- a table containing blocks whose results should be concatenated
I'm not quite sure whether a distinction between block and expression
needs to be maintained. There is none in Scheme/Lisp.
Regards,
Dolfi