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
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Ten Things Every Java Programmer Should Know About Ruby
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password