D - more power than (really) needed !
Walter Bright
newshound at digitalmars.com
Sun Mar 12 01:27:29 PST 2006
"Hasan Aljudy" <hasan.aljudy at gmail.com> wrote in message
news:dupijv$isn$1 at digitaldaemon.com...
> 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.
>
> That's because we've been taught math in a procedural way ;)
> Ideally, x, the angle, would be an object, and sin is a method on that
> object.
> However, I think that we're so used to think about math functions in a
> procedural way, so it's better they stay procedural.
>
> Like you said, it'll be a bit confusing if it was an object, but that's
> not because it can't be an object, but mainly because that's not how we
> think about it.
If we think of a number as a number rather than an object, then it's just
obfuscation to force it into being an object.
More information about the Digitalmars-d
mailing list