[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Why no perl style 'use strict' in ruby.

seebs

7/13/2007 1:58:00 PM

In message <32b873ff0707130654v26b3dcd2ycecd30c500276b0a@mail.gmail.com>, "Ben Edwards" writes:
>I am however not totaly sure why ruby does not have something like
>perls 'use strict'. It seems that use strict is safer and can help
>you spot errors qucker. I also have to confess that I prefer strong
>predefined typing for the same reason but understand this may not be
>as OO.

Ruby's defaults are in some cases closer to "use strict" than perl's; for
instance, you can't accidentally create a global variable when you meant
to create a local variable. In other cases, the looseness is a central
theme of the language's design.

Duck typing is a philosophical choice; an option to remove it would be
ridiculous. It's like asking for a C variant where you can't address
memory using pointers.

-s

1 Answer

brabuhr

7/13/2007 2:14:00 PM

0

On 7/13/07, Peter Seebach <seebs@seebs.net> wrote:
> Duck typing is a philosophical choice; an option to remove it would be
> ridiculous. It's like asking for a C variant where you can't address
> memory using pointers.

Pointer-less C:
http://www.geocities.com/mengjins...
http://www.embedded.com/showArticle.jhtml?articleID...

:-)