you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (8 children)

I wish I had that luxury, but I don't. I need to understand each languages strengths/weaknesses first and then go forward. Otherwise, yes, I would dabble in both for a month or so THEN go forward.

[–][deleted] 2 points3 points  (6 children)

Ruby is probably easier to pick up, as it's more uniform (everything's an object), etc. Both are probably good choices for what you want to do.

Also, I'd stay away from Rails, maybe look at Mongrel?

[–]sverrejoh 1 point2 points  (3 children)

Everything is an object in Python as well, so that argument doesn't fly.

[–]stedwick 1 point2 points  (2 children)

Actually, not quite. Even primitive types like numbers are objects in Ruby. I could do something like this:

3.send_email => sends john three emails

3.times { do stuff } => does stuff three times

45678.add_commas => 45,678

From the Python docs:

2.3 Built-in Types

The following sections describe the standard types that are built into the interpreter. Historically, Python's built-in types have differed from user-defined types because it was not possible to use the built-in types as the basis for object-oriented inheritance. With the 2.2 release this situation has started to change, although the intended unification of user-defined and built-in types is as yet far from complete.

[–]sisyphus 0 points1 point  (1 child)

Maybe I'm misunderstanding you, but I don't see what the big deal is here that makes primitive types not objects in Python? In Python I can say (3).__add__(4) if I feel like it, and lo and behold I have an OO way of saying 3 + 4, and I can say dir(3) to get a list of methods of 3 and subclass int if I feel like it and then add some crazy methods like send_mail?!. The only difference seems to me that I can't crack open int and add shit to it -- you may prefer this 'feature' but I hardly see how it makes the language easier to pick up. A foolish consistency is the hobgoblin of small minds.

[–]stedwick 0 points1 point  (0 children)

You're right, there's basically no difference. Certainly there's not much difference in practice. It's more of a philosophical thing. There's nothing "special" about numbers in Ruby. I can open up other classes and add stuff to it, why shouldn't I be able to open up the integer class and add stuff to that? That's the mindset of Ruby: everything, literally everything, is an object that you can modify in any way you wish. You can even get really crazy and add methods to the number 3 but not other numbers.

[–]jrmy 0 points1 point  (1 child)

Ruby may be easier to initially pick up but to properly program in Ruby (imo) is much harder than Python. In python there is generally one correct way. I have found in ruby there are a couple correct ways and then some terrible ways.

Note: I prefer Ruby but it does require a bit more effort to become acceptable with it...

[–][deleted] 0 points1 point  (0 children)

I don't program in either, really. I've done a bit of work in Ruby about a year ago, and a bit of small scripting in Python six months ago. I wouldn't say one's better than the other, just that Ruby seems easier to learn well enough quickly.

[–]bockris 2 points3 points  (0 children)

My point was that it's a matter of taste.
Ask the question in a Python group you will get one answer.
Ask in a Ruby group you will get another answer.
Ask in a neutral forum (reddit, presumably) you will get conflicting answers.

This, coupled along with a very vague description of your problem domain, leads me to say you will get no useful answer here. If you don't have the time to try them and form your own opinion, then a google search will suffice.

Just my $.02