Please advise on Ruby vs Python, for someone who likes LISP a lot

后端 未结 12 2087
闹比i
闹比i 2021-02-12 12:03

I am a C++ developer, slowly getting into web development. I like LISP a lot but don\'t like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and a

相关标签:
12条回答
  • 2021-02-12 12:17

    pick the most popular one for your domain so your work gets the most visibility. some might say ruby/rails for web, python for everything else. picking a language just because its like lisp is really not appropriate for a professional.

    0 讨论(0)
  • 2021-02-12 12:23

    Both Ruby and Python are fairly distant from the Lisp traditions of immutable data, programs as data, and macros. But Ruby is very nearly a clone of Smalltalk (and I hope will grow more like Smalltalk as the Perlish cruft is deprecated), and Smalltalk, like Lisp, is a language that takes one idea to extremes. Based on your desire to do cool hacks on the language level I'd go with Ruby, as it inherits a lot of the metaprogramming mindset from Smalltalk, and that mindset is connected to the Lisp tradition.

    0 讨论(0)
  • 2021-02-12 12:24

    Alex Martelli gives a good analysis of the subject. It's a bit dated now, but I agree with the basic gist of it: Python and Ruby are two different ways of implementing the same thing. Sure there are some things you can do in Ruby that you can't do in Python. And sure Python's syntax is (arguably) better than Ruby's. But when you get down to it, there's not a whole lot of objective, scientific reason to prefer one over the other.

    A common thing that you will hear is this: the platform is more important than the language and Python has a better platform than Ruby (this argument works both ways so don't vote me down, all you rubyists). And there is some truth to it. Unfortunately, it's not very relevant though. If you dislike the platform for either languages, there are implementations of both in Java and .Net, so you can use those if you have concerns about the platform.

    0 讨论(0)
  • 2021-02-12 12:28

    If you like lisp, I think you'll be better like ruby but c++ reminds me more of python. I've posted a small post about this subject : http://hartator.wordpress.com/2011/06/12/ruby-vs-python-2011/

    0 讨论(0)
  • 2021-02-12 12:29

    I am a Pythonista; however, based on your requirements, especially the "cool hacks on the language level", I would suggest you work on Ruby. Ruby is more flexible in the Perl way and you can do a lot of hacks; Python is targeted towards readability, which is a very good thing, and generally language hacks are a little frowned upon. Ruby's basic types can be modified in a hackish way that typically prototype languages allow, while Python's basic types are more suited for subclassing.

    By the way, I would add a minor correction: both Ruby and Python are very, very object-oriented, and neither is intended to be used for quick-and-dirty scripts the Perl way. Among the two, Ruby is syntactically more similar to Perl than Python.

    0 讨论(0)
  • 2021-02-12 12:30

    I'm a Rubyist who chose the language based on very similar criteria. Python is a good language and I enjoy working with it too, but I think Ruby is somewhat more Lispy in the degree of freedom it gives to the programmer. Python seems to impose its opinions a little bit more (which can be a good thing, but isn't according to our criteria here).

    Python certainly isn't more Perlish— Ruby is essentially a Smalltalk/Perl mashup (some of its less-used features are pulled directly from Perl), whereas Python is only distantly related to either.

    0 讨论(0)
提交回复
热议问题