Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > proper use of classes

Reply
Thread Tools

proper use of classes

 
 
Eleanor McHugh
Guest
Posts: n/a
 
      02-02-2009
On 1 Feb 2009, at 11:54, David A. Black wrote:
> Hi --
> On Sun, 1 Feb 2009, Sean O'Halpin wrote:
>> On Sat, Jan 31, 2009 at 11:00 PM, Mike Stephens
>> <(E-Mail Removed)> wrote:
>>> An attractive aspect of Ruby is how it is usually presented as
>>> agnostic
>>> - you can use it in an object oriented style or you can choose
>>> functional or procedural styles. So if you like to think in terms of
>>> procedures instead of objects you can still sit at the same tables
>>> as
>>> other Ruby programmers. Having said that, I would guess that any
>>> procedure can be re-represented in terms of objects and your
>>> thinking
>>> should move in that direction over time to align with the essence
>>> of the
>>> language.
>>>

>>
>> The power of Ruby does not come from its object-orientation alone -
>> how many times do we really use polymorphism or inheritance? Yet I
>> bet
>> most of us use #select, #map, blocks and literal regular expressions
>> in almost every program we write. I certainly do.

>
> At the same time, though, I'd say that object orientation per se
> doesn't depend on polymorphism and inheritance. To me it's the
> convergence back onto the sending-msgs-to-objects paradigm that's at
> the heart of it (though I don't put that forth as a CS-ly correct
> characterization, just my sense of it).


I like to think of Ruby as being the English of programming languages.
It's got a large and flexible vocabulary that makes it very powerful
to work with, but unlike Perl or Lisp or C it's also a very easy
language to get to grips with.

I'm particularly keen on the loose and pragmatic approach to OO. Being
able to open classes and objects at will makes it very easy to
specialise them for a specific project. And as for inheritance
hierarchies, there's much less pressure to build these rigid and
gargantuan frameworks than in certain mainstream languages.

As for the functional aspect, I tend to even forget I'm using a
functional style because message sending is so pervasive that chaining
higher-order functions is the obvious way to solve many problems.

Oh, and best of all Ruby's fun to code in


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason



 
Reply With Quote
 
 
 
 
Todd Benson
Guest
Posts: n/a
 
      02-02-2009
> Oh, and best of all Ruby's fun to code in

Right, as long as everyone remembers not to scuff their knees on the
playground sand jumping from the jungle gym

Todd

 
Reply With Quote
 
 
 
 
Matt Lawrence
Guest
Posts: n/a
 
      02-02-2009
On Mon, 2 Feb 2009, Eleanor McHugh wrote:

> I like to think of Ruby as being the English of programming languages. It's
> got a large and flexible vocabulary that makes it very powerful to work with,
> but unlike Perl or Lisp or C it's also a very easy language to get to grips
> with.


English does not borrow from other languages. English follows other
languages into dark alleys, knocks them over, and rifles through their
pockets for loose vocabulary.

-- Matt
It's not what I know that counts.
It's what I can remember in time to use.

 
Reply With Quote
 
Juan Zanos
Guest
Posts: n/a
 
      02-02-2009
On 2 f=E9vr. 09, at 16:11, Matt Lawrence wrote:

> On Mon, 2 Feb 2009, Eleanor McHugh wrote:
>
>> I like to think of Ruby as being the English of programming =20
>> languages. It's got a large and flexible vocabulary that makes it =20
>> very powerful to work with, but unlike Perl or Lisp or C it's also =20=


>> a very easy language to get to grips with.

>
> English does not borrow from other languages. English follows other =20=


> languages into dark alleys, knocks them over, and rifles through =20
> their pockets for loose vocabulary.
>
> -- Matt
> It's not what I know that counts.
> It's what I can remember in time to use.
>


English, unlike other languages, is very consistent and =20
straightforward. For example, the plural of boot is boots and the =20
plural of foot is foots. Ok. Maybe I need a better example.

1100


 
Reply With Quote
 
Rick DeNatale
Guest
Posts: n/a
 
      02-03-2009
[Note: parts of this message were removed to make it a legal post.]

On Mon, Feb 2, 2009 at 4:11 PM, Matt Lawrence <(E-Mail Removed)> wrote:

>
> I like to think of Ruby as being the English of programming languages. It's
>> got a large and flexible vocabulary that makes it very powerful to work
>> with, but unlike Perl or Lisp or C it's also a very easy language to get to
>> grips with.
>>

>
> English does not borrow from other languages. English follows other
> languages into dark alleys, knocks them over, and rifles through their
> pockets for loose vocabulary.



Actually, I'd say quite the opposite, English vocabulary is the result of a
long history of the English language being raped by the Languages of
whatever happened to be the latest invaders. Those words were injected into
the language rather than being pick-pocketed.

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale

 
Reply With Quote
 
Gary Wright
Guest
Posts: n/a
 
      02-03-2009

On Feb 2, 2009, at 8:00 PM, Rick DeNatale wrote:
> Actually, I'd say quite the opposite, English vocabulary is the
> result of a
> long history of the English language being raped by the Languages of
> whatever happened to be the latest invaders. Those words were
> injected into
> the language rather than being pick-pocketed.



I'd say that English is more like the Borg. Resistance is futile.
You will be assimilated.

Gary Wright




 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      02-03-2009
Juan Zanos wrote:

>> English does not borrow from other languages. English follows other
>> languages into dark alleys, knocks them over, and rifles through
>> their pockets for loose vocabulary.

>
> English, unlike other languages, is very consistent and
> straightforward. For example, the plural of boot is boots and the
> plural of foot is foots. Ok. Maybe I need a better example.


"Okay" is a real word. "OK" is an historical bacronym. (The published
dictionaries have this one wrong.) Okay means "emphatic yes" in Wolof, one of
the languages English... knocked over. "Banana" and "hippie" come from the same
source...
 
Reply With Quote
 
Julian Leviston
Guest
Posts: n/a
 
      02-03-2009
Why does this matter?

Sent from my iPhone

On 03/02/2009, at 2:34 PM, Phlip <(E-Mail Removed)> wrote:

> Juan Zanos wrote:
>
>>> English does not borrow from other languages. English follows
>>> other languages into dark alleys, knocks them over, and rifles
>>> through their pockets for loose vocabulary.

>> English, unlike other languages, is very consistent and
>> straightforward. For example, the plural of boot is boots and
>> the plural of foot is foots. Ok. Maybe I need a better example.

>
> "Okay" is a real word. "OK" is an historical bacronym. (The published
> dictionaries have this one wrong.) Okay means "emphatic yes" in
> Wolof, one of
> the languages English... knocked over. "Banana" and "hippie" come
> from the same
> source...
>


 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      02-03-2009
Julian Leviston wrote:
> Why does this matter?


>>> Ok. Maybe I need a better example.


>> "Okay" is a real word.


Following up on a joke - someone needed a better example. (-:
 
Reply With Quote
 
Joel VanderWerf
Guest
Posts: n/a
 
      02-03-2009
Julian Leviston wrote:
> Why does this matter?
>
> Sent from my iPhone


Ah, the irony.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Times where one would use new style classes vs classic classes Quek Python 3 07-03-2008 05:51 PM
How to design proper classes when the requirements are quite complex? tenxian Java 7 04-27-2008 11:17 PM
Generating proper classes with XSD.exe Kees de Winter ASP .Net 2 02-02-2007 08:26 PM
Proper way to use an imported constant under 'use strict'? H. Wade Minter Perl Misc 8 04-25-2004 12:58 AM
Proper use of CharsetDecoder? Harald Kirsch Java 1 08-05-2003 07:15 PM



Advertisments