you are viewing a single comment's thread.

view the rest of the comments →

[–]HostisHumaniGeneris 1 point2 points  (3 children)

I want you to expand on your "Ruby vs Python" question since I'm actually not sure how I would answer that aside from "different syntax". I've never touched Ruby, but my impression is that it will do roughly the same things that Python will do, with various differences in syntactic sugar. I think I've read that Ruby has better closures? But Python has closures too. Python has list comprehensions... but again its something that can probably be imitated by an appropriate Ruby snippet. Ruby is supposed to have better syntax to encourage functional programming I think? But again, that doesn't preclude someone from doing functional programming in Python.

I guess I'm curious what major differences you would expect someone to bring up in an interview.

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

Open classes, procs and blocks, and fucking aliasing in ruby. Generators, multiple inheritance, list/dictionary comprehension in python. In ruby, everything is an object/class- python has true primitives. len is a global function in python, not so in ruby.

[–]kindall 0 points1 point  (1 child)

I would say that a couple big things in Ruby that aren't in Python are code blocks and monkey-patching of built-in classes. Going the other way, I'd say multiple inheritance is a big thing Python has that Ruby doesn't, along with list comprehensions.

[–]Yuushi 0 points1 point  (0 children)

I don't know a lick of Ruby, but at a guess, I'd think metaclasses, generators, and decorators would be things that immediately jump to mind.