D - more power than (really) needed !

Kyle Furlong kylefurlong at gmail.com
Thu Mar 9 13:31:34 PST 2006


Hasan Aljudy wrote:
> Deewiant wrote:
>> Oskar Linde wrote:
>>
>>> Deewiant wrote:
>>>
>>>> Walter Bright wrote:
>>>>
>>>>> The trouble with OOP is, well, not everything is an object. For
>>>>> example, take the trig function sin(x). It's not an object. Of
>>>>> course, we could bash it into being an object, but that doesn't
>>>>> accomplish anything but obfuscation.
>>>>>
>>>>
>>>> sin(x) isn't an object, but x is, and sin can be made a property of
>>>> that object.
>>>
>>> How would you define a binary mathematical function then? atan2(y,x) and
>>> binominal(n,k) for instance.
>>>
>>> /Oskar
>>
>>
>> My reply was somewhat tongue in cheek - I suppose I should have added 
>> a smiley.
>> Of course everything is not an object.
>>
>> Although binomial(n, k) I'd define as n.choose(k). <g>
> 
> n.choose(k) is actually /less/ confusing than binomial(n,k)

I disagree, think about how you would do a math problem. It would not involve this sort of syntax.



More information about the Digitalmars-d mailing list