|
|
Sapphire supports this...or rather, did. I intend to completely remove
it, checking and giving an error on uses of keywords as variable names.
It just introduced too much complexity into the language, and let you do
things that were completely useless...like declaring blocks named "for",
"if", "while", etc that are uncallable. (block call syntax is similar to
C function call syntax, which looks like loop and if statement syntax...)
A sufficiently flexible syntax would allow you to avoid having things
like shape and texture parameters as part of the language. In this case,
"size" would be a named parameter or method call, not a language
keyword. This would also make the core parser code far simpler, the
language more consistent and the language interface easier to code with,
and probably cost a bit of parsing speed. Ideally, the language would be
compiled once to bytecode and then interpreted, so the speed hit is a
one-time thing...things like meshes could make use of hard-coded parsers
for speed, perhaps some simplified file format...the description
language seems like the wrong place to specify huge data sets, though
it's certainly useful for generating them.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/
Post a reply to this message
|
|