Re: overloading - need good approach

From: Dmitry A. Kazakov (mailbox_at_dmitry-kazakov.de)
Date: 03/26/05


Date: Sat, 26 Mar 2005 09:04:47 +0100

On Sat, 26 Mar 2005 04:49:38 GMT, Thomas G. Marshall wrote:

> Dmitry A. Kazakov coughed up:
>> On Sat, 19 Feb 2005 21:55:20 +0100, Gibby Koldenhof wrote:
>>
>>> I'm designing my own little (typeless) OO language, and I'm sorta
>>> stuck on how to nicely support overloading of methods.
>>
>> As a matter of fact, you cannot have overloading in a typeless
>> language. After all the very way overloading works is based on the
>> type profiles. I also cannot imagine an OO language without types,
>> but well, that's aside.
>
> Consider the two methods, in a typeless language:
>
> public method(param1) {......}
>
> public method(param1, param2) {.......}
>
> Are these overloaded?

Good point.

Arguably this hypothetic language still has [anonymous] function types to
distinguish "method"s at the call point, but I won't insist on that.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


Relevant Pages

  • Re: Nearest Common Ancestor Report (XDb1s $1000 Challenge)
    ... Often the language of choice used is ... >database, ... (snip some more stuff I agree with) ... >See my comment above about operator overloading. ...
    (comp.object)
  • Re: What a pity that Java not Include Operators overloading,Wake up
    ... Patricia Shanahan wrote: ... overloading is *not* good for. ... It is too late to keep the language designers from bad operator ... String concatenation is not addition, ...
    (comp.lang.java.programmer)
  • Re: Boost process and C
    ... If you want overloading, use C++. ... Why should I swallow that big fat language? ... I just want a few specific features that are part of many programming ... Then use fortran and its not available operator overloading, ...
    (comp.lang.c)
  • Re: Exceptions in C/C++
    ... overloading much more easily. ... The transcendental functions are much worse. ... Only a very small percentage of programmers ever have a need to call a transcendental function with a complex argument, but that small percentage is still a large number of programmers. ... Whether the group of people who benefited was large enough to justify adding complex math to the language is a different question, but there was little point in doing it at any level other than direct support in the language itself. ...
    (comp.lang.c)
  • Re: future C standards
    ... Your proposal talks about overloading of user-defined functions and needs to cover many more possible combinations of argument types than 7.22.3 needs to deal with. ... implement the semantics, and for that to be possible, the existing resolution rules would have to logically follow from your rules, or at least not conflict with them. ... As it happens, all the functions that those macros map to have only floating-point parameters, and the rules don't have to deal with functions defined with integer or pointer parameters. ... And this means that if we have to tread language ...
    (comp.std.c)