POV-Ray : Newsgroups : povray.general : Request: new simple pattern : Re: Request: new simple pattern Server Time
8 Aug 2024 20:27:32 EDT (-0400)
  Re: Request: new simple pattern  
From: Warp
Date: 12 Jan 2001 05:21:22
Message: <3a5edaa2@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: Why go looking though a bunch of macro files
: for a specific function when if can be hard wired into the program.

  Let me think about some reasons why a macro would be better:

  1) The larger the program, the more the bugs. If everything is hard-coded
into the program, the source code gets larger and harder to maintain.
  A bug in a macro is a lot easier to fix than a bug in the source code
(eg. an update macro pack could be released instead of releasing a whole
new version of povray).
  Besides, macros are less likely to have bugs than C source code.

  2) Hard-coding this kind of feature into the binary makes it pretty
non-flexible. When a pattern (or whatever) is hard-coded into the binary,
then you just get that pattern and that's it. If you want a bit different
pattern, you are out of luck.

  3) When the pattern is a macro, you can actually see its "source code".
You can learn from it, modify it, make your own version of it and so on,
at no extra cost (such as having to have a compiler and manage to compile
the whole thing again and again). If the pattern is hard-coded in the binary,
you have no easy way to get any advantage of it.

  4) There's no advantage between hard-coded and macros when you are looking
for a certain pattern. If both, built-in patterns and macro patterns are
documented in the same way, it really doesn't matter which way it is
implemented. You still have to search through the documentation to see if
there's any pattern you like there; it doesn't matter how the pattern is
implemented.

-- 
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/


Post a reply to this message

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