News for hackers. Stuff that matters.
Re:Why Perl? by rcfox on Tuesday November 15, 2011 @11:53AM (#3238892)
"In Ruby, ordinary variables lack sigils, but "$" is prefixed to global variables, "@" is prefixed to instance variables, and "@@" is prefixed to class variables."[0]

Okay, I don't know Ruby well enough to know if these are commonly used features, but the statement that there are no sigils is false.

[0] http://en.wikipedia.org/wiki/Sigil_(computer_programming)#La...

Re:Why Perl? by DanielRibeiro on Tuesday November 15, 2011 @12:54PM (#3239225)
You are right. What I should have said is: "the lack of sigils to indicate type of a variable". In perl this noise is everywhere, while in Ruby its is a lot less common.

Specially if you use accessor methods. In ruby, unlike smalltalk, this instance variable sigils are pretty much impossible to get rid off. This is because in Smalltalk local variables have to be declared, and if you don't, the Language will try to use the instance variables. In Ruby it would default to being a local variable, if already assigned, or invoking a method with no arguments.

Re:Why Perl? by prophetjohn on Tuesday November 15, 2011 @12:45PM (#3239187)
Ruby even uses some predefined globals (eg $_) that are pretty much straight out of Perl.

http://www.tutorialspoint.com/ruby/ruby_predefined_variables...

Re:Why Perl? by jamesbritt on Tuesday November 15, 2011 @01:19PM (#3239367)
Ruby even uses some predefined globals (eg $_) that are pretty much straight out of Perl.

They exist, and while I'm a fan of $: over $LOAD_PATH I don't think I've even seen $_ used in the wild.

Re:Why Perl? by prophetjohn on Tuesday November 15, 2011 @01:28PM (#3239408)
I don't really have the perspective to comment on how common they are, but they do exist. Ruby is full of little things like this, which one of the things I simultaneously love and hate about Ruby
Re:Why Perl? by pyrhho on Tuesday November 15, 2011 @12:24PM (#3239083)
@ is common.. The others are pretty rare.