[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Ten Things Every Java Programmer Should Know About Ruby

Lothar Scholz

1/29/2005 5:34:00 PM

Hello Navindra,

NU> E S <eero.saynatkari@kolumbus.fi> wrote:
>> * Ruby is strongly typed, not statically typed. Each variable has a
>> strict type that it represents, but a type declaration is not needed
>> in e.g. method definitions. The result of this is that you don't treat
>> and classify objects based on what their type is, you do it based on
>> what that particular object can do. This concept is called 'duck
>> typing': "If it walks like a duck and it quacks like a duck, it's a
>> duck".

NU> What is the point of strong typing then?

Good question.

Thinking a little bit about it i would say that in fact then ruby is untyped
not strong typed. It's just that out of history with untyped you mean
that you can do byte operations in the address space with pointer
arithmetics or other ultra low level operations.
And the consequences in the history was an uncontrolled crash now it
is a controlled crash (aka exception).

If i can add and remove methods and instance variables whenever i
want, how is this diffent from a C typecast ?


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's