|
![](/i/fill.gif) |
In article <3e58e425@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> Will W <wil### [at] nospamwizzards net> wrote:
> > Organizing functions by return type is, for me, an intriguing idea.
>
> There's a very good reason for this in programming, as I explained
> previously.
This isn't programming, it's documentation. The first thing most people
will look for when looking for a string length function is a group of
functions for manipulating strings.
> The type of something determines where it can be used. For example, if
> an integer is expected in a particular place, then any item of integer
> type can be used there (ie. an integer literal, an integer variable, an
> integer function or an expression which result is an integer).
The purpose determines where it is useful. strlen() is only useful when
handling strings, it is useless for math stuff.
> The purpose of a function (eg. to manipulate strings or whatever) is
> a higher-level concept which has nothing to do with its type. The parameters
> the function takes have nothing to do with its type (they don't affect in
> any way *where* you can use the function).
Higher-level means closer to human thinking. The documentation is meant
to teach humans.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |