|
![](/i/fill.gif) |
On Sat, 22 Feb 2003 07:16:15 -0500, Warp quoth:
> Christopher James Huff <cja### [at] earthlink net> wrote:
>> I see a bunch of categories that it doesn't fit in, and one that it
>> does. strlen() isn't a float function, it is a string function.
>> Categorizing by purpose makes much more sense.
>
> strlen() is a float function.
>
> There's a good and logical reason for calling it a float function (and
> you should know it without me telling it).
> The reason for calling it a float function according to its return
> value
> type is that it can be used anywhere a float is expected. In the same
> way a vector function can be used anywhere a vector is expected.
> So naming and categorizing functions by their return value is not only
> logical but it's actualy a categorization by purpose: Float functions
> are those which can be used anywhere a float value is expected.
Is there any reason why it can't go in both places? It's a float
function because it returns a float, and a string function because it
operates on strings.
And before you object, "trace" would be a vector function because it
returns a vector, and an object function because it operates on objects.
--
Mark
Post a reply to this message
|
![](/i/fill.gif) |