Pragma syntax

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
41 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: Syntactical extensions vs. pragmas everywhere

Jecel Assumpcao Jr
Klaus D. Witzel wrote on Sat, 19 Aug 2006 11:14:03 +0200
> [Jecel] whatever is in the <> escape shall be formulated as (if it not  
> already is) a message and sent to the compiler (my favorite, just in case  
> someone asks :)

Note that this has the huge disadvantage of being unidirectional: it is
easy to generate stuff from the source but impossible to recreate the
sources for the generated stuff. This is what Chuck Moore found out when
he tried to create a sourceless system called "Ok".

Another problem is that using messages that haven't been defined in the
compiler will get you a "message not understood" error (though this
could be intercepted and converted to use the mechanism for syntax
errors instead). My impression is that people want pragmas to just be
ignored if the compiler doesn't know what to do with them.

I actually used this in a very Forth-like OO language project and it
worked rather nicely - it even allowed things like what { } does in
Squeak and you could nest as many levels as needed. But for my Smalltalk
work I don't feel the need for this kind of thing (to be fair, my system
doesn't have primitives, FFI or anything like that).

-- Jecel

123