POV-Ray : Newsgroups : povray.advanced-users : Allowing reserved keywords to be used as identifier names? : Re: Allowing reserved keywords to be used as identifier names? Server Time
28 Jul 2024 18:27:29 EDT (-0400)
  Re: Allowing reserved keywords to be used as identifier names?  
From: Christopher James Huff
Date: 3 Jun 2004 22:06:13
Message: <cjameshuff-C031AE.21060903062004@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.