View Single Post
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2006-04-16, 11:54

Java is a much better idea than Ruby, because it forces you to do everything in classes, you have to declare all your variables, there's strict type checking, etc. I don't know Ruby too well (it looks rather straight-forward from your example, though), but apparently it allows you the same sloppy programming that all those glorified scripting languages like Perl, PHP, etc. do. The idea of classes in those languages is nice, but it's usually just slapped on top of the existing stuff, and doesn't really add a lot. Learning a proper language is a much better idea. You can always go back to PHP et al. later. But to understand the concepts of object-oriented programming, you need a more thoroughly object-oriented language.

Edit: And to all those that will now post stuff like "Oh noes! You have to learn teh SmallTalk C++ Eiffel Occam": Java has the big advantage of being sufficiently object oriented, while still being of practical relevance and providing a lot of useful information when errors occur. Java exceptions tell you what happened, and they usually occur close to the actual error. When you go one element past an array in C and overwrite a pointer, you will get an error somewhere that has nothing at all to do with the actual problem in your program. That makes Java the perfect language for learning programming, IMHO.

Last edited by ghoti : 2006-04-16 at 11:59.
  quote