|
|
hi,
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Cousin Ricky <ric### [at] yahoocom> wrote:
> > On 2024-06-27 11:44 (-4), William F Pokorny wrote:
> > > Release R15 of the yuqk fork has an implementation supporting constant
> > > identifiers / macro parameters. They are indicated by using a leading
> > > '_' character in the name.
> >
> > I also agree with Ingo: a keyword or directive would be better, such as:
> >
> > #const MagicNumber = 12345;
> >
> > I'm thinking a keyword modifier would be more flexible than a directive,
> > for example:
> >
> > #declare const GlobalVal = 12345;
> > #local const LocalVal = 54321;
"modifier", yes. +1.
> Hmmm. Yes, but maybe no?
> Why not just have another separate type of declaration?
the keyword modifier, more often than not I think, would be in close proximity
to the variable where/when it's used. an advantage.
> ...
> So maybe #constant can ONLY be changed by specifically using another #constant
> directive.
if a variable's value can/will change "at runtime", #constant would simply be
misleading.
> I dunno - I'm not really a computer language person, but the pro's and cons of
> each approach ought to be hashed out with an eye towards Pov-Ray 4.0
maybe "4.x" could have a revamped "SDL 2.0", with more "introspection" tools, so
we can write better, "type safe" code.
regards, jr.
Post a reply to this message
|
|