which language

Henry Spencer henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Sat Jan 31 23:26:01 UTC 2004


On Sun, 1 Feb 2004, Peter L. Peres wrote:
> To the point: I would like to use arity and type-based function
> implementation matching, as is available in C++ and Prolog. Can this be
> done in Perl or TCL or Python without reinventing the wheel ?

Generally speaking, no.  These languages all have quite relaxed notions of
"type" and aren't prepared to distinguish between functions on that basis. 
And since they don't do that, there is little point in distinguishing by
number of arguments either, and so they don't.  You can write a single
function and have it make decisions based on how many arguments it got
handed and what types they have, but the language won't do it for you. 

                                                          Henry Spencer
                                                       henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list