Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Learn a scripting language besides Python [closed]

Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the Pythonistas. Can you recommend scripting languages that would be interesting and useful to learn besides of Python?

like image 461
zoli2k Avatar asked Jul 14 '10 05:07

zoli2k


4 Answers

Learn a Lisp. Whether it's "scripting" or not, Eric Raymond had the right of it when he wrote:

"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot."

The programming paradigm needed to be highly effective in Lisp is sufficiently unlike what you use with Python day-to-day that the perspective it gives is very, very much worth it.

And within Lisps, my choice? Clojure; like other Lisps, its macro system gives you capabilities comparable (actually superior) to the excellent metaprogramming in Python, but Clojure in particular has a focus on batteries-included practicality (and an intelligent, opinionated design) which will be familiar to anyone fond of GvR's instincts. Moreover, Clojure's strengths are extremely disjoint from Python's -- in particular, it shines at highly-multithreaded, CPU-bound concurrent programming, which is one of Python's weaknesses -- so having both in your toolbox increases the chance you'll have the right tool when a tricky job comes along.

(Is it scripting? In my view, that's pretty academic these days; if you have a REPL where you can type code and get an immediate response, modify the state of a running program, or experiment with an API, I see a language as "scripting" enough).

like image 166
Charles Duffy Avatar answered Nov 16 '22 02:11

Charles Duffy


Look, Python pretty much has all you need (in my opinion) for application programming. You can write anything from a protocol stack to YouTube, from media players to 3D games and graphics and you get excellent performance.

It occupies the same niche as some of these other mentioned languages:

  • C, you have access to almost all of the useful C/C++ libraries. The only reason I would pick to write something in C over Python is because I needed the performance gain. Even then, I would probably prototype it in Python first; it's much easier to revise your design when your application is written in Python.

  • Ruby, there is no good reason to ever use Ruby instead of Python.

  • Perl, it's great for some particular kinds of tasks, but if you're a fan of consistent, readable and sane programming styles you will hate looking at about 95% of existing Perl code. I don't know if this is because the people who program in Perl tend to be (in my experience) sys admins first and programmers second, or because Perl has a design philosophy that allows for multiple distinct ways to achieve the same effect.

Given that, I would say that if you are going to learn another language, make sure it gives you the ability to do something new. There are two scripting languages that I would recommend for you to learn:

  • Bash, what a joy it is to manipulate your filesystem with a combination of for loops and pipes. Bash programming doesn't give you more than what you can already do with Python, but if you are a *nix user you will experience great gains in your daily productivity.

  • Javascript, being able to write browser-based applications is a useful skill and almost definitely the way most applications will be done in the future. The Javascript/browser environment is set to gain a whole host of capabilities in the coming few years, from audio manipulation to OpenGL graphics, and some very fast engines are either in the works or already available (like V8, which powers the Chrome browser and compiles Javascript to native byte code.) Have you seen Quake2 ported to WebGL?

My answer basically boils down to this: first, learn languages that are useful.

like image 24
Jesse Dhillon Avatar answered Nov 16 '22 01:11

Jesse Dhillon


  • Ruby - what it enables and does with blocks is really interesting, and quite foreign to python based programming

  • Erlang - the functional language has a lot of interesting examples and it will definitely make your head work differently afterwards (in a good way)

  • Javascript - yes, I'm serious. ALthough there's a fair number of grips to be had with this prototype language, it does some really interesting things with that prototyping and just slightly differently than Ruby and/or Python. And a ton of folks are pouring big money into making Javascript a outstandingly fast scripting language.

like image 42
heckj Avatar answered Nov 16 '22 02:11

heckj


I would recommend learning Haskell and a dialect of Lisp such as Scheme or Common Lisp, if you master either of those you'll gain insight into how things are accomplished with the functional paradigm and it'll help out your Python as well.

Here are some languages categorized by paradigms I'd learn:

Imperative/Procedural languages:

  • C

Functional paradigm languages:

  • Haskell
  • Common Lisp/Scheme

Similar object oriented languages:

  • Ruby
  • ECMAScript

Other:

  • Perl

I would advise you to stay away from PHP unless you really need the work. You would probably want to run back to Python.

like image 22
meder omuraliev Avatar answered Nov 16 '22 03:11

meder omuraliev