chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] How do I name these procedures?


From: Thomas Chust
Subject: Re: [Chicken-users] How do I name these procedures?
Date: Fri, 16 Apr 2010 00:22:58 +0200

2010/4/15 Jeronimo Pellegrini <address@hidden>:
> [...]
> I wonder if the optional argument would make the function call too much
> slower?
> [...]

Hello Jeronimo,

the optional argument processing will take a little time, but whether
that is relevant should be determined by a benchmark.

> [...]
> But there's a difference between these two:
>
> ia+ia (sums two intervals)
> ia+f64 (sums an interval to a flonum)
>
> Using only ia+ would mean checking the type inside the procedure, which
> I'd like to avoid.
> [...]

To avoid duplication of name parts I would probably still call the sum
of two intervals just ia+. ia+f64 sounds fine to me, but unless there
is also ia+f32 or something similar, I might consider to use something
like ia-shift.

In the end it's all up to you and anybody who doesn't like the names
can always use a renaming import when accessing your egg :-)

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]