Monday, May 01, 2006

Learning Ruby

I had a look at ruby a month or two ago, and decided that although it looked nice in concept, the syntax of the language was too horrible for me. After reading Aaron's blog entry I thought I'd have another looks at it, and although I still find large amounts of the syntax to be rather ugly, I really like other parts of the language, and I can see it being a pretty good scripting language. I might use it for prototyping KDE apps in future, and for writing shell scripts.

I'd really like a language which combines my favourite parts of Java, JavaScript, PHP, Ruby, C++ and C#. (Maybe some Lisp and Prolog too). I'd rather keep Perl and Bash out of it though. And I'd like that language to be usable for nearly everything, so I could develop KDE apps, shell scripts, web sites (client side and server side) all with the same language. But at the moment I haven't found one language which does everything, and I doubt I ever will. In fact, I'm not sure I really want that, because it'd probably be so complicated I'd never actually be able to use it for anything.

5 comments:

vladc6 said...

... the syntax of the language was too horrible for me.

Yeah, that's exactly what I was thinking. The fact that Ruby intentionally inherited so much cryptic syntax from Perl makes it hard to understand. Going from Python to Ruby in some ways makes me feel like I'm going back to the Stone Age...

Mystilleef said...

I agree, I dislike Ruby's syntax a lot. Python has the best syntax I know, followed closely by Scheme.

Joseph said...

Is there any clear set of criteria that coder's use to determine how nice or horrid a language's syntax is? It seems to me that for most, it is little more than a personal taste...

James Ots said...

Personally, I really like the Java syntax because it's verbose and readable. I can come back to code a year later and still understand it. And I can look at someone else's code and more often than not, understand it pretty quickly.

I dislike a lot of Python syntax (defining blocks by indentation especially), and I dislike the Perlishness of Ruby.

There are some things I dislike about Java, but after using if for years I still find it to be the nicest language I know. Not necessarily the nicest environment though, and also not the best language for some tasks. But the nicest to code in.

Mathieu said...

well, ruby is exactly what you said you were looking for. you can do shell scrips, web, KDE app, anything.

about the ugly syntax, I dont know what you are not used to. but Ilike to get example of those, but I find ruby to be the prettiest language ever. without any useless. ruby is the bare minimum you could write to write your problem. going back to PHP or C is just a nightmar.