Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Initial impressions of Ruby

Name: Anonymous 2006-03-11 7:12

Ruby is lol Object Oriented. That's why you can do -5.abs. In Java you would have to do Math.abs(-5), but Ruby is lol Object Oriented so you don't have to do that shit.

Unless you want to do say 1012.log10. Sorry, seems you have to do Math.log10(1012) after all.

Name: Anonymous 2006-03-13 6:49

>>19
Are you sure ? I think it's a statement. Care to explain ?

Anyway, in pure OOPL 'if' should be a method, like Boolean class in Smalltalk has #ifTrue: and #ifFalse: methods.

  (1 > 0) ifTrue: [ '1 is greater than 0' printNl ] !

As far as I know in Ruby 'if' is just a reserved word.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List