POV-Ray : Newsgroups : povray.general : How about $ for declare? : Re: How about $ for declare? Server Time
3 Aug 2024 00:19:32 EDT (-0400)
  Re: How about $ for declare?  
From: Brian Elliott
Date: 14 Aug 2004 06:55:38
Message: <411defaa@news.povray.org>
"Rafal 'Raf256' Maj" <spa### [at] raf256com> wrote in message
news:Xns95456D5662A7raf256com@203.29.75.35...
> NotForSpam@AskIfUWant news:411dcc08@news.povray.org
>
> > You're quite right.  I tried it, and to alias it, you'd have to write:
> >   #macro sph() sphere #end
> >   sph() { <sphere and texture options> }
> > And the parentheses would have to be included with every invocation,
> > adding two more characters and obfuscation to otherwise straight code.
> >  It would hardly be a worthwhile "abbreviation"
>
> so we just need an #macro that can be called without "()"... I think that
>
> #alias sph sphere
>
> is a good idea. Perhaps it is not hard to implement?

Hi,

Whilst promoting the case for aliasing, please do consider *what and how
much*, really, is the material gain to be gotten by implementing it - eg.
typing "sph" instead of "sphere"?  Is "sphere" so inconvenient for an able
person to write, or such a major percentage of your entire SDL file?  Most
people I know who use computers a lot, and that includes programmers, are
usually very fast typists already.

I did a little experiment just now, and I succeded in typing "sphere " (with
trailing space) 19 times in 30 seconds, and that was WITH correcting several
mistakes.  But I spend a lot of "think time" when I am not actually typing
anything.  So aliasing will not save me much time!

Also, though this doesn't help those on open-source ports of PoV-Ray, the
Windows users of PoV-Ray have that lovely in-built editor.  All one need do
on WinPov is type "sph" then press Tab, and you have your complete word.
Try it with "pig" as well!

Meanwhile, I put some thoughts about aliasing in reply to Sam's message.
The implications are not immediately obvious behind the immediate personal
convenience, which is usually as far as people look when they decide on
something.  But potentially major consequential disadvantages do lie behind
aliasing, which I think should be considered carefully before the community
decides we really want this convenience feature.  If a solution is presented
that avoids the disadvantages, then good.

Cheers,
  Brian


Post a reply to this message

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