Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Why no perl style 'use strict' in ruby.

Reply
Thread Tools

Why no perl style 'use strict' in ruby.

 
 
Ben Edwards
Guest
Posts: n/a
 
      07-13-2007
First let me say I much prefer developing in ruby that perl. Ive been
developing in both for about three months (maintaining old perl
scripts and doing new stuff in ruby).

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.

Peoples thoughts pleas,
Ben
--
Ben Edwards - Bristol, UK
http://www.flickr.com/photos/41303704@N00/ - have a look at my pics
If you have a problem emailing me use
http://www.gurtlush.org.uk/profiles.php?uid=4
(email address this email is sent from may be defunct)

 
Reply With Quote
 
 
 
 
brabuhr@gmail.com
Guest
Posts: n/a
 
      07-13-2007
On 7/13/07, Peter Seebach <(E-Mail Removed)> 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/mengjinsu/PLCC.htm
http://www.embedded.com/showArticle....leID=192503623



 
Reply With Quote
 
 
 
 
James Edward Gray II
Guest
Posts: n/a
 
      07-13-2007
On Jul 13, 2007, at 8:54 AM, Ben Edwards wrote:

> I am however not totaly sure why ruby does not have something like
> perls 'use strict'.


The strict pragma does three things in Perl. Two of the items are to
forbid the use of symbolic references and "barewords." Ruby doesn't
support these features, so it's not an issue.

The other feature of the strict pragma is to avoid creating random
global variables every time one is mentioned. In Ruby, globals look
different from other variables (the leading $), so this is not really
a problem. Local variables need to be assigned to before use, since
that's Ruby's method of declaration. That solves the same problem
the strict pragma handles for Perl.

James Edward Gray II


 
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
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Why do so many new style ansi streams and files etc, still use old style strings? Kza C++ 4 03-03-2006 07:00 PM
Why the Perl docs are so great was why the perl docs suck Al Perl Misc 1 10-16-2005 06:35 PM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM



Advertisments