[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Defending Ruby's OOP

Lucas Holland

5/10/2007 7:26:00 PM

Hi,

I've got someone here saying that Ruby (and other languages) can't be
100% object-oriented because if and unless and so on (keywords) are no
objects.

How can I defend the claim that Ruby is 100% OOP?

--
Posted via http://www.ruby-....

33 Answers

Giles Bowkett

5/10/2007 7:36:00 PM

0

> I've got someone here saying that Ruby (and other languages) can't be
> 100% object-oriented because if and unless and so on (keywords) are no
> objects.
>
> How can I defend the claim that Ruby is 100% OOP?

Righteously! Ye must purge yon heretics with whips and scorpions!

(Alternatively, why bother?)

--
Giles Bowkett

I'm running a time management experiment: I'm only checking e-mail
twice per day, at 11am and 5pm. If you need to get in touch quicker
than that, call me on my cell.

Blog: http://gilesbowkett.bl...
Portfolio: http://www.gilesg...

Gary Wright

5/10/2007 7:48:00 PM

0


On May 10, 2007, at 3:26 PM, Lucas Holland wrote:

> How can I defend the claim that Ruby is 100% OOP?

Just redefine the meaning of 100%, that should work.
If not, redefine the meaning of OOP.

Really, it seems like a silly argument. Better to
simply understand what Ruby is or isn't and the same
for other languages. I doubt that there is some
mathematically-true total ordering on programming
languages relative to OOPness (or any other criteria
for that matter).

Gary Wright

Gary Wright

5/10/2007 7:52:00 PM

0


On May 10, 2007, at 3:39 PM, Jason Roelofs wrote:
> Or better yet, tell him to design a language that has "if" "unless"
> etc as
> objects and see where that goes. What does having if/unless as
> objects even
> mean?

In Smalltalk, if-then-else is a message and messages are objects....

If Ruby is 100% OOP, then what is Smalltalk?

Gary Wright

Giles Bowkett

5/10/2007 7:52:00 PM

0

> Tell him to find a more substantial argument. That's the lamest complaint I
> think I've ever heard about Ruby or dynamic languages in general.
>
> Or better yet, tell him to design a language that has "if" "unless" etc as
> objects and see where that goes. What does having if/unless as objects even
> mean?

It's like saying the car is inferior to the horse because you can't
feed the car oats.

Smalltalk is the purest OOP language there is and it doesn't **have**
if or unless at all. You know how you can bypass control structures in
Ruby by using blocks and closures instead? In Smalltalk, that's the
only way to do control structures at all. "If" and "unless" don't even
exist in Smalltalk. "If" and "unless" are not fundamental in the first
place. They're a conscious design feature. It sounds like the person
you're arguing with is a Smalltalk stalwart and/or an argumentative
type making a silly, meaningless point which is only useful for the
sake of arguing.

Seriously, what kind of object would an If object be? What is the
essence of If-ness? I think if anybody could answer that question they
would instantly achieve enlightment and then their head would explode.

--
Giles Bowkett

I'm running a time management experiment: I'm only checking e-mail
twice per day, at 11am and 5pm. If you need to get in touch quicker
than that, call me on my cell.

Blog: http://gilesbowkett.bl...
Portfolio: http://www.gilesg...

Dan Debertin

5/10/2007 7:53:00 PM

0

Giles Bowkett

5/10/2007 7:59:00 PM

0

> Well, as others have said, it's a stupid thing to argue about.

I think getting into that kind of argument at all is a bad idea.

You're only defending a language's design decisions when engaged in
ideological arguments. That kind of argument is bad for the community,
because it encourages picking sides, and bad for the language itself,
insofar as it influences design decisions. Design decisions are not
about taking a side ideologically. They're about building something
useful.

Don't even bother defending Ruby in any context, except against the
charge that it is not **useful** for some purpose, and then only if it
really **is** useful for that purpose.

--
Giles Bowkett

I'm running a time management experiment: I'm only checking e-mail
twice per day, at 11am and 5pm. If you need to get in touch quicker
than that, call me on my cell.

Blog: http://gilesbowkett.bl...
Portfolio: http://www.gilesg...

Gregory Brown

5/10/2007 8:13:00 PM

0

On 5/10/07, Giles Bowkett <gilesb@gmail.com> wrote:
> > Tell him to find a more substantial argument. That's the lamest complaint I
> > think I've ever heard about Ruby or dynamic languages in general.
> >
> > Or better yet, tell him to design a language that has "if" "unless" etc as
> > objects and see where that goes. What does having if/unless as objects even
> > mean?
>
> It's like saying the car is inferior to the horse because you can't
> feed the car oats.

I'm patiently waiting for the Oatsmobile.

Alan Garrison

5/10/2007 8:22:00 PM

0

Gregory Brown wrote:
> On 5/10/07, Giles Bowkett <gilesb@gmail.com> wrote:
>> > Tell him to find a more substantial argument. That's the lamest
>> complaint I
>> > think I've ever heard about Ruby or dynamic languages in general.
>> >
>> > Or better yet, tell him to design a language that has "if" "unless"
>> etc as
>> > objects and see where that goes. What does having if/unless as
>> objects even
>> > mean?
>>
>> It's like saying the car is inferior to the horse because you can't
>> feed the car oats.
>
> I'm patiently waiting for the Oatsmobile.
>
>
I certanly dig my Toyoata.



Bill Guindon

5/10/2007 9:06:00 PM

0

On 5/10/07, Gregory Brown <gregory.t.brown@gmail.com> wrote:
> On 5/10/07, Giles Bowkett <gilesb@gmail.com> wrote:
> > > Tell him to find a more substantial argument. That's the lamest complaint I
> > > think I've ever heard about Ruby or dynamic languages in general.
> > >
> > > Or better yet, tell him to design a language that has "if" "unless" etc as
> > > objects and see where that goes. What does having if/unless as objects even
> > > mean?
> >
> > It's like saying the car is inferior to the horse because you can't
> > feed the car oats.
>
> I'm patiently waiting for the Oatsmobile.

And once you get one, you can declare yourself to be Oatman! I'm not
sure what superpowers that brings, besides being 'regular'.


--
Bill Guindon (aka aGorilla)
The best answer to most questions is "it depends".

Gregory Brown

5/10/2007 10:08:00 PM

0

On 5/10/07, Bill Guindon <agorilla@gmail.com> wrote:

> > I'm patiently waiting for the Oatsmobile.
>
> And once you get one, you can declare yourself to be Oatman! I'm not
> sure what superpowers that brings, besides being 'regular'.

well, a car fueled by oats would probably be carbon neutral... Oatman
would indeed be as least as eco-friendly as captain planet!