Perl 6

Apr. 26th, 2007 11:38 am
prog: (monkey)
[personal profile] prog
I feel the gentle winds of conventional wisdom buffeting me towards Ruby.

Is there a practical reason why I might want to do this? Coz if I learned it just for S&G but then didn't immediately start using it for serious, I'd forget it.

"Dude, Rails" is not a sufficient reason, unless you can tell me why I'd want to use Rails over any Mason-based solution.

(Referring to Ruby as "Perl 6" is from [livejournal.com profile] xach, and the funniest in-joke I've heard all week.)

Date: 2007-04-26 05:03 pm (UTC)
From: [identity profile] karlvonl.livejournal.com
I personally love Ruby, but that's probably mostly because it's the scripting language that I learned, rather than say Perl or Python. But if you already know Python, I'm not sure there's a compelling reason to switch to Ruby. That is, unless you're a big fan of object-oriented programming. Ruby is object-oriented through and through, as opposed to Perl and Python which sort of have OO bolted on. Heck, Ruby is the only language I've ever used that's so OO that you can actually call methods directly on literals, e.g.:

"Hello world".reverse
3.15.round

Also, Ruby's introspection and meta-programming facilities are very powerful, and make it a popular choice for developing domain specific languages.

And then, of course, there's the cartoon foxes:
http://poignantguide.net/ruby/whatisit.html
Chunky bacon!

Date: 2007-04-26 05:49 pm (UTC)
From: [identity profile] dougo.livejournal.com
Ruby is the only language I've ever used that's so OO that you can actually call methods directly on literals

What, Java doesn't count? Strings are objects, just not numbers. (Although I wouldn't be surprised if that was added in Java 6.)

Date: 2007-04-26 07:01 pm (UTC)
From: [identity profile] karlvonl.livejournal.com
Sorry, I didn't realize you could call methods on Java string literals. It's not something that's come up for me in practice.

Date: 2007-04-26 07:24 pm (UTC)
From: [identity profile] jaq.livejournal.com
Java 5 and 6 have autoboxing, which can implicitly convert between object and primitive types for numbers in some circumstances. But that doesn't extend to letting you call methods on literal numbers unfortunately.

Date: 2007-04-26 06:39 pm (UTC)
From: [identity profile] xach.livejournal.com
JavaScript and Smalltalk and Lisp all let you call methods on literals...

August 2022

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28 293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 25th, 2025 12:27 am
Powered by Dreamwidth Studios