share
Stack OverflowWhat is the best scripting language to learn?
[+52] [36] strider24
[2008-10-17 17:26:55]
[ scripting polls ]
[ http://stackoverflow.com/questions/213048] [DELETED]

I have been learning C and C++ for sometime now. But, they do not allow me to do a lot of things like writing a script/program to get a bunch of files from the Internet easily. So, I want to learn a scripting language which is fun and which is useful for everyday chores. Which one would you recommend, and why?

Other information that might be useful:

  1. References to tutorials / helpful information on how to learn the language.
  2. References to implementations of the language.
  3. Niches where you have found it to be particularly useful.

One language per response, please.

(3) This is a poll - kindly mark question n ans as community editable as a sign of good citizenship.. - Gishu
yes, community wiki please. - Chris Marasti-Georg
+1 Great question - 01010011
I think this really belongs on SuperUser or ServerFault depending on what you mean by an everyday scripting language. If your automating normal computer tasks, superuser. If you are automating server stuff, well, serverfault.com - Chris Lively
[+91] [2008-10-17 17:45:07] Eli Courtwright [ACCEPTED]

Python

The reason this question is so subjective is that you didn't say much about what kind of scripting you want to do. Of course, you did mention downloading and processing files from the Internet, so I'll recommend Python.

Another Stack Overflow user asked a specific question about doing webpage scraping and asked which language would be best. The first answer outlines all the Python modules in the standard library which help accomplish this sort of thing, so you may find that helpful: http client's programming language [1]

Since you already know C/C++ and thus are new to Python programming, I recommend the book Dive Into Python, which is written for people who already know how to program and focuses on how Python makes it easy to perform common tasks. The full text of the book is available online at http://diveintopython.net/toc/index.html

The "How to Learn Python" Stack Overflow question might also be helpful, since it contains links and descriptions of various Python resources: How to learn Python? [2]

[1] http://stackoverflow.com/q/86206/1694
[2] http://stackoverflow.com/q/17988/1694

@Eli, if Python is your choice why not up-vote the existing answer and add a comment. As it is, you have split the vote for python so the most popular answer may not bubble to the top ;-) - johnstok
(2) @johnstok: Eli's answer is better (more clear, more explanation, more detail) than Joel's. - eyelidlessness
1
[+48] [2008-10-17 17:38:47] eyelidlessness

JavaScript

JavaScript (technically, ECMAScript or Standard ECMA-262; also known as JScript). With the increasing availability of many fully featured server-side/command-line implementations, it is becoming a great general purpose scripting language.

Edit: I want to be clear, I don't think this is the best scripting language to learn, as there is no best scripting language to learn. This is just one I'd recommend people learn if they haven't, because it's so useful.

References:

Implementations:

Niches: It's not the first place you'd think, but with Jaxer and Env.js/Rhino (see links above), JavaScript on the server is becoming more and more viable. And if you think about it, it becomes a natural choice as it is the de facto standard client-side language.


(3) If I were responsible for a CS curriculum at a university, I would push hard to teach Javascript in the first year. - Max Lybbert
Any good place to start learning JavaScript (or is it Javascript?) - strider24
Isn't it technically ECMAScript? - Cristián Romo
Sure, and "Javascript" belongs to Netscape (I think; may now belong to Mozilla?), but it is the most common name, and is used by pretty much everyone except when discussing the standardization efforts specifically. - eyelidlessness
(16) You would push hard to teach Javascript in the first year? Don't first year students have enough trouble making the compiler happy and understanding its errors? Do they really need to be confused by "undefined" errors and all the other subtle ways to mess up without proper feedback in Javascript? - BobbyShaftoe
I wonder if the single downvoter would care to explain their reasoning. - eyelidlessness
@eyelidlessness probably because JavaScript is neither "fun", nor "useful for everyday chores"? - Alex B
@Alex, I guess fun is subjective but I enjoy it , especially when compared to a lot of other languages I've had to write (including its much more verbose cousin, ActionScript), and quite a lot seem to agree. As far as utility for everyday chores, I don't see how that can be denied. I mean, obviously it won't wash your dishes, but neither will the other candidates. Which set of "everyday chores" may depend on implementation (the browser environment won't do a lot of what you could do in bash for instance), but those implementations do exist (and are proliferating). - eyelidlessness
(1) The web is the new OS and JavaScript is its scripting language. JS also has many odd properties that make it very powerful and interesting as a language in general: first class functions, JSON, prototype-based object model. I wish I could use JS in more situations, I think it's a marvelous scripting language. - CodexArcanum
2
[+36] [2008-10-17 17:28:26] johnstok

Ruby

I'd suggest Ruby.


(8) I started learning Python but after trying Ruby, I couldn't go back. Ruby is a happier, more elegant and doesn't feel as hacked together as Python (IMHO). The only downside is that it runs slower. That should change (for the better) with 1.9. - Kurt
Plus Ruby's support for Unicode leaves something to be desired imho. But that aside I do enjoy the language, its a really elegant and easier language for me to express my thoughts into code. It might not always be the fastest or best language for the job but its a nice one. - Pharaun
3
[+23] [2008-10-17 17:55:28] Barry Brown

Perl

If you're familiar with C and Unix, Perl seems like a natural fit. The syntax is similar, but you get a lot of other "benefits" such as:

  • Regular expressions
  • Strings of unlimited size
  • Arrays of unlimited size and type
  • Easier file maniplation
  • Hash tables
  • CPAN
  • Flexible syntax
  • and more...

It's debatable whether you'll think features such as automatic type coercion, undefined values, and the sometimes-cryptic syntax are beneficial. I'll tell you this, however: with Perl, it was not uncommon for me to write a 100+ line program in a single sitting and have it work perfectly the first time I ran it. Not having to worry about declaring variables, overrunning arrays, and dealing with illegal null values allowed me to focus on solving the problem, not getting beat up by the compiler.

A lot is going to depend on what you need your scripting language for. I found Perl useful for the one-off programs I needed and for doing system administration tasks (chowing through log files, screen-scraping web sites, monitoring system resources, etc.)

My gut feeling, though, is that if you haven't had prior experience with Unix utilities such as grep, awk, and sed, you may not "get" Perl. In Perl-land, problems are best solved with hashes and regular expressions. They are far more productive (in terms of programmer time) than trying to shoehorn every data structure into arrays.


(3) I take issue with Perl sytnax being similar to C. - Joel Coehoorn
(5) @Joel: Why? Its syntax is based on C. That it diverges is part of what makes it a different language, but that doesn't mean its syntax doesn't come from C. As is the case with most languages. - eyelidlessness
When I learned Perl, I had a similar background as the OP, plus I had some shell scripting experience. For the most common things, Perl syntax is very similar to C: the use of braces for code blocks, = for assignment, brackets for arrays, etc. I was learning Perl 4 at the time, which was simpler. - Barry Brown
4
[+17] [2008-10-17 18:12:51] Pistos

Ruby

Ruby is a great language for "everyday chores" and webscraping (see hpricot [1] and Mechanize [2]).

Googleage should provide plenty of tutorials and things for learning Ruby. See also this SOF question on learning Ruby [3].

[1] http://code.whytheluckystiff.net/hpricot/
[2] http://mechanize.rubyforge.org/mechanize/
[3] http://stackoverflow.com/questions/6806/what-is-the-best-way-to-learn-ruby

5
[+13] [2008-10-17 18:14:13] Dalin Seivewright

Lua

What about Lua? I've been learning it for a while and I've found that you can develop/prototype applications fairly quickly and there is a lot of flexibility with it. The only thing that standard Lua doesn't handle very elegantly is object oriented programming (OOP). It can be done, but it can be tricky. There are also several versions of Lua which have different features... such as one specifically for making OOP much more easier.

If not Lua then I would suggest, as others have, that you take a look at Python. I find though that Pythons syntax rules are very annoying. If you have a particular indentation style that you use for C and C++ then you'll probably have to make a few modifications to it if you're planning on taking up Python.


6
[+9] [2008-10-17 18:31:25] ScottStonehouse

Powershell

If you use Windows, make it PowerShell.

Good

PowerShell combines a rich, relatively sensible syntax with .NET, COM, and WMI integration. It also offers a novel (and very cool) pipeline of objects.

It is both a great scripting languange and a great shell, so your knowledge is useful in both contexts. (Compare to CMD which is a fine shell but a crappy script language, or CScript/WScript, which are fine scripting languages, but no shell.)

Bad

If you're not on Windows, it's not much use to you.

If you hate Perl syntax, you'll mildly dislike PowerShell's syntax.

http://en.wikipedia.org/wiki/Windows_PowerShell


7
[+7] [2008-10-17 17:42:57] Fabian Buch

Shell, Ruby, Python

For "getting" a bunch of files from the internet there are easier ways than to learn a scripting language. I'd suggest wget or curl. These can be combined with shell scripts.

For more advanced scripting more modern languages like Ruby and Python are most fun and useful for all kinds of stuff.

Ruby [1] for example is easy to learn. You can even try it online interactively [2] or learn it in 20 minutes [3].

[1] http://ruby-lang.org
[2] http://tryruby.hobix.com/
[3] http://www.ruby-lang.org/en/documentation/quickstart/

8
[+7] [2008-10-17 17:27:32] Joel Coehoorn

Python

Python seems to be getting a lot of traction.


To add to this, you can choose the .NET flavor and go with Python.NET. - Jason N. Gaylord
Maybe you could explain why you would choose python and not just say "python, because its cool". :) - Node
And developer traction isn't important? - Joel Coehoorn
It supports multiple paradigms.(procedural,OOP,functional,...) - Pratik Deoghare
(5) -1 Python is already listed, consider updating the existing answer. - mizipzor
(10) @mizipzor - if you sort your answers oldest first, you'll see this was the first response to the question. - Joel Coehoorn
@Joel Coehoorn - Maybe I expressed myself in a bad way. The point was that there is no reason to list python twice. I downvoted this one because the other had a more developed answer. I still think they should be merged. - mizipzor
9
[+6] [2008-10-17 18:02:46] David Kemp

If you just want to play, why not try some out?

Personnally, I'd favour Ruby or JavaScript (I've not quite figure Boo out yet), but there's no reason why you might not find that you like other languages more, or that other languages suit are more suited to different problems.

One thing you may find, however, is that the cross-language querying features (like XPath and Regular Expressions) are more useful to learn that the individual languages themselves...


++ for cross-language features like XPath/regex - eyelidlessness
10
[+6] [2008-11-25 16:13:57] community_owned

Falcon, Scala

Go try Falcon and Scala, both are amazing!


(1) Wow, never heard of Falcon before but at a first glance it looks very promising. I've programmed quite some stuff with Lua but beeing a professional Java Developer I'm missing some kind of 'official' OO support there. Seems that Falcon has more to offer in that direction. Thank you for mentioning it here. - Ridcully
11
[+5] [2010-05-31 11:04:55] Donal Fellows

Tcl

While I'm very biased as a developer of Tcl, I think that Tcl's definitely worth a look. Others have put together better reasons [1] (about half way down) why than I feel I can advance myself without being a bit too hypocritical. Quoting from there:

Why Tcl? Because there seems to be nothing quite like it, in terms of simplicity, expressive power, flexibility, robustness, portability, scalability, and deployment. I don’t mean in terms of each individual issue, but in terms of the combination of those aspects. As a package deal, Tcl embodies a surprisingly clever and effective set of trade-offs. I could probably dismiss Tcl on every single issue in isolation, and name another language which would be preferable – but no single language can go where Tcl goes.

[1] http://news.jeelabs.org/2010/05/12/there-is-a-reason/

(1) +1 due to irrational bias - TokenMacGuy
I think Tclkit(s) are a compelling reason for learning Tcl: "a compact, single file executable containing a complete scripting runtime"; see equi4.com/tclkit - George Jempty
12
[+4] [2008-10-17 18:13:53] rodfaria

Lua

How about Lua [1]? It is a fast, light-weight, embeddable scripting language. I'm not saying that it's THE BEST (it is subjective), but open your mind, try it out and be happy [2].

[1] http://www.lua.org
[2] http://www.lua.org/quotes.html

13
[+3] [2009-09-23 14:12:26] community_owned

PHP

PHP is pretty easy, but has a pretty awful syntax and it forces a lot of self discipline to be possibly used for designs with more than 10000 or 20000 lines (although is it possible, for example the wonderful WordPress blog package is written in PHP, or the HORDE email and calendar package for web servers is written in PHP).

Perl also somehow has the disadvantage of a syntax that can become pretty ugly if a lot of different programmers with different coding styles and shortcuts usage mindsets cooperate on a project: here their TMTOWDI [1] design goal (there is more than one way to do it) can be a disadvantage (I personally love Perl a lot, though...)

Python seems to be more elegant and more consistent, although probably at the beginning you will need some time to get used to their indentation-based scope delimitation...

For Ruby, I've seen it shortly and I did like it a little, but not too much. For me is a little too extreme, and I would consider it only if to use Ruby on Rails.

As a whole, I think that, no matter which you decide, mostly you will not regret your choice anyway, because all of them are, for rapid prototyping and for small glue-logic scripts or text-based activities, REALLY GREAT!!

[1] http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it

(1) Wordpress is a lot of things, but I don't think "wonderful" is a word I'd use to describe it. - eyelidlessness
14
[+2] [2011-03-13 12:52:12] Tremwar

Python

it's great from beginner to expert, it's fast, and you can do anything you need to do... if you need a breath of fresh air after a while on Python try Ruby(my favorite)... and if you want to appreciate Python/Ruby's simplicity try Perl... cough


15
[+2] [2008-10-17 17:44:51] johnstok

Groovy

Perhaps Groovy?


I wouldn't recommend Groovy for scripting. It can eat alot of your memory if you are not careful. - jpartogi
yes, lots of libraries, very portable. - Ray Tayek
Can be a good choice for those in the Java world, as It's extremely easy to get started. Nevertheless, as a Java dev that has 6 months experience as a Groovy programmer, I find I choose Python for scripting tasks. It feels more cohesive, it's faster, and it's better documented. None of these reasons alone make Groovy a bad choice, but it seems like Groovy is a language that has much reason to be liked and is rarely loved. So when I'm writing a script and I can choose the language, I use a language that I love. This may account for the lack of upvotes to this perfectly legitimate answer. - Eric Wilson
16
[+1] [2008-10-18 00:07:03] yogman

It depends on the specific program you're writing, which means you have to learn Perl, Python, PHP, and Ruby, all of them. Unfortunately, I have no knowledge of Ruby. And, JSP is less like a scripting language.

  1. Heavy on HTML, less heavy on DB, heavy on DOM/XML/XPath
    Learn PHP. It has a whole lot of quality third-party libraries.

  2. Heavy on HTML, heavy on DB
    Learn Ruby on Rails. Its MVC framework will make your life happier, I heard. But this choice may limit the type of web servers. Ruby on Rails works like a charm with Apache, lighttpd? I don't know.

  3. Generic pipe(stdin/stdout) scripts, or heavy regular expression
    Perl. You cannot claim yourself as a shell script master without knowing Perl. You can easily install new modules with its CPAN repository.

  4. Massive concurrent network processing
    Python. The powerful network library Twisted runs on top of Python. Python looks beautiful compared to Perl.


17
[+1] [2008-10-17 17:28:23] Maudite

Ruby is gaining ground


(3) If the number of different answers here which suggest Ruby is indicative of the community, it will fork into several different versions soon... - Pete Kirkham
I heard this 3 years ago. - Apprentice Queue
18
[+1] [2008-10-17 17:29:18] Jason N. Gaylord

PowerShell, VBScript, C#

If you are referring to a scripting language to write some quick admin things, there's always PowerShell scripts, VBScript scripts, etc.

But if you're looking to learn a language to do web stuff, I'd recommend learning C#. It's down the same path as C and C++ and you can write your applications for both the web and Windows. You can also take it a step further and learn XAML which could render an application as WPF (Windows) or Silverlight (Web).


(1) These should not be grouped together. Make them separate answers, and delete this answer. - Jay Bazuzi
(1) C# is a scripting language? - Alix Axel
(1) is C# a scripting language? - Saurabh
Sure. It's a server scripting language. If you read the context of the item and not just the words, you'll see that they are looking for something that compares to C and C++, neither of which is considered a typical scripting language. - Jason N. Gaylord
Any language with the capability to be compiled and run from one process can be trivially converted to a language to run a script - vsj.co.uk/dotnet/display.asp?id=417 is one of many which does this for C#, the same has been done for Java, and so on. I have a suspicion that some versions of awk translated to C, compiled the C and ran it, so with a bit of work C can be used as a language for scripts. The reason awk is a scripting language but C# isn't is that awk has a feature set designed for creating a program in one file for one task. - Pete Kirkham
Thanks for the extra info Pete! - Jason N. Gaylord
19
[+1] [2010-10-11 11:07:16] Kaoru

Perl

Perl is the best scripting language to learn for many reasons, but the two that might not spring to most people's minds are

  • Learning Perl is the best introduction to Scripting Languages ever written
  • The Perl community is very friendly to new-comers

If we're honest the actual language differences between Python, Perl and Ruby are all pretty small. This means that the reference material and support you get is really a good way to make a your decision.


20
[+1] [2010-10-11 18:36:45] Dale Gulledge

Perl

I strongly respect the reasons given by several other people in favor of some of these languages. In some ways, you can make good arguments for some of them being superior to Perl as languages. However, you asked which one to learn as a scripting language. Perl was created for that purpose. It makes scripting easy. Perhaps more to the point, the Perl community has a long history of documenting Perl for scripting tasks and developing modules to support the needs of programmers using it for those tasks.

There was once a time when programming languages existed more in isolation than they do today. Now, you have to consider them in the context of the libraries or modules and communities around them. While the quality of those is excellent for several of the languages other people have mentioned, their focus is different. A good language with a wide range of modules specifically built for the purpose you have in mind is the way to go.


21
[+1] [2010-02-19 15:16:17] 0x69

+1 to LUA cause it beats Python and Ruby on CPU time and memory usage :-)

p.s.

Lua vs Ruby 1.9 benchmark (you can look also Lua Vs Python 3):

http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=lua&lang2=yarv [1]

[1] http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=lua&lang2=yarv

(1) If you are that concerned those characteristics, then you probably don't want a scripting language, but a dynamic language which allows true compilation, such as common Lisp. - Pete Kirkham
Of course, let us disregard quality libraries as a criteria. But I guess it's a nice resume item. - Apprentice Queue
22
[+1] [2010-05-31 11:06:19] David Frantz

Why just one Language?

When I think scripting I think first Unix shell programmming where BASH is the common shell progam. Whatever your system is set up with though should be learnt to some extent. One can't reccomend BASH for major projects but it is well worth your time to at least learn a little.

Man does not live on bread alone so I'd strongly reccomend learning Python. Python is very cross platform so that helps a lot. Python is a lot like VIM, you can find it anywhere. Pervasive doesn't make it good but it does mean transferable skills.

To a some extent Ruby is in the same ball park as Python but not as mature. JavaScript is great but has severe limitations when inside a browserr.

Dave


23
[+1] [2010-05-31 10:42:31] ponzao

Lua

It is easily embeddable, very fast, has a simple syntax and best of all it is very easy to earn points on Stack Overflow because there aren't that many active Lua users here (though the ones that are, are very skilled).


24
[0] [2010-05-31 10:34:54] joseph

I agree with the Lua one, it is one of the easiest programming languages to learn and I'm just 14 years old and I knew Lua since I was 9 years old. If a 9 years old could learn it, you could too and Lua isn't as much a memory hog as Python or Ruby.

You could also try using Pascal, it is an easy language too...


25
[0] [2010-08-22 03:06:51] Rick

Python for the simple reason that its syntax is a huge benefit, not a hindrance, you just have to break away from the mindset of brackets and after a little while you will not want to have to use them for anything, they serve no real purpose other than to muck up code, think, every bracket takes up a line in properly spaced code and this is done for no real reason... if you are writing code cleanly then you should be indenting anyways, so why the need for brackets, i don't get why this would bother someone


If I had a job where the getting syntax right was the most significant intellectual challenge, I would be very bored. - Pete Kirkham
26
[0] [2011-02-11 16:51:21] DssTrainer

I think the problem with this question is the platform of execution. PHP is invaluable these days for web development. But PHP won't help you if you are looking to script OS events.

For Web: PHP & Javascript (and jQuery is the best framework)

For Windows: - VBScript should be a highschool course. It's on all windows boxes by default. You should know the basics (pun intended) - Perl is probably the biggest, probably because it is cross platform. But the syntax is strange IMO (if/elif/elsif, etc) - Python is highly regarded but much less popular - Tcl was my first automated scripting language and it was very good. Learned it in about 6months with the help of the big black Tcl/Tk reference book - Lua I only know from the Grand Theft Auto addon for "Multi Theft Auto" used it. It seemed easy enough to use, but again, not very popular.

I use vbscript in most cases when scripting windows events simply because its just "there" on all boxes. No other software to install or screw around with. vbsEdit is a great debugger but you can use the msscript debugger from microsoft with any popular editor (notepad++, ultraedit, etc). Additionally, learning vbscript is like learning the piano.. it helps you grasp the concepts of programming with other languages if you learn it first.


27
[0] [2008-10-17 18:14:22] fivebells

If you know C/C++, python has the advantage of relatively painless integration with those languages via Pyrex [1]. This is incredibly useful if you need to interface a C/C++ library or you need to speed a python application up. In fact, for my purposes, elevates python from "scripting language" to "general purpose language."

[1] http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/

you might want to edit the most-upvoted Python answer to add this, rather than having another answer with the same language. - Pete Kirkham
28
[0] [2008-10-17 18:27:24] Raindog

Of all of the scripting languages mentioned here, I believe Ruby is the best choice. I learned Ruby after having learned C/C++, C#, VB, VBS and a little javascript and to me Ruby has the easiest to learn and cleanest syntax, the fewest surprises when coding and things that just make sense.

For example, Python uses whitespace as a programming construct and those namehere methods, perl is way to easy to write "write once" code and favors global variables. Javascript supports a lot of metaprogramming facilities that ruby and python have but they are not as cleanly implemented and it feels almost like template meta programming in C++.


You are bashing Perl and Python without having taken the time to learn them? - postfuturist
I learned a little about them and found other things to be easier to use while provide the same, if not more language features. - Raindog
what are "namehere methods"? - Pete Kirkham
29
[-1] [2008-10-17 17:30:50] Alex Fort

If you want a good utility language, learn Perl. It's amazing, and wonderful.


I don't care for Perl personally but I upvoted this because it's annoying to me that people are downvoting it just because Perl isn't popular. It's obviously a very capable language, and that is merit enough to suggest it. - eyelidlessness
I am throwing my hat into the ring for Perl as well. It's a fully featured language with a long history and a huge codebase/userbase outside of the .NET junkies. - Paul Nathan
Perl actually has some Lispish roots ( perl.com/pub/a/2007/12/06/soto-11.html look for "lisp"), and takes those roots more seriously than Python ( artima.com/weblogs/viewpost.jsp?thread=98196 ). - Max Lybbert
(3) If I had the rep to do so, I would downvote — not because of any animus toward Perl but because the answer was of no help. I now know that the answerer likes Perl, but I don't know why. The answerer included no links to teach me about the language, nor any enumeration of Perl's features. - savetheclocktower
Puhliiizzze. Not perl. There's gotta be a more civilized scripting language than Perl. - jpartogi
perl is outdated, PHP is a "child" so to speak of perl, obviously perl has more libraries than just about any scripting language since its so old, but it has awkward syntax and IMO clearly shows its age compared to a language like python or ruby - Rick
30
[-1] [2008-10-17 18:08:18] schmoopy

I recommend JavaScript simply because it's in line with C# which is more in lines of the language you are currently using (thus if you switch back and fourth a lot). My main reason for learning C# was because writing VB.NET then JavaScript seemed unnatural.

There are too many good JavaScript places online to list, any quick Google search will give you more than enough, but I say if you have particular issue, YOU POST IT ON HERE because this thing rocks! ;-)


31
[-1] [2010-10-25 03:12:39] SilentThunderStorm

OK.. This REALLY depends on the platform that you are writing for, and the purposes you are trying to accomplish. This being stated, here is my opinion of three of the leaders in this poll (I have no idea about Lua or Ruby... looked over Lua, its syntax seems weird... no experience with Ruby):

Perl is quite powerful, but its syntax is a mess. It hails back to the early days of Unix programming, and unfortunately, the syntax shows this badly. Imagine, as a previous poster stated, writing most of what you do as a regular expressions, rather than working with arrays and objects. It does boast a large, dedicated community, but this is mostly because it is as old as dirt, and a LOT of people grew up on it. Primarily, only really usable for Unix based environments.

JavaScript is a bit of a pain, but not as bad as Perl. The worst issue with JavaScript is that it can produce some maddeningly invisible errors... invisible, as in that when you run it? NOTHING HAPPENS. Right... nothing. No error code, no "You forgot a bracket on line 23"... nothing. This is especially problematic when there are multiple interpretations of JavaScript, depending on the browser and/or environment it is run in. Couple this with severe limits to its capabilities, such as not being able to write to the file system (at least on client machines... I have no direct experience with JS in server environments), and you have a non-starter.

Python is extremely powerful, especially for math. It doesn't use brackets (like C, C++, JavaScript, etc), yet the syntax is still pretty familiar for anyone knowledgeable in those languages. There are a few issues, here, though as well, such as picking what version to learn. Version 2.7 is the most widely supported, but is inconsistent, version 3.1 has corrected this, but is incompatible with many libraries, still. A more minor annoyance, which might not affect you, is the fact that there is no means in the language to declare anything private... you basically just label it private by a naming convention, and hope others respect that. Python is also available on many, many platforms, and is pretty consistent across them. You can pick up python 3.1 on a local windows machine, for example, and still be able to run the code with little or no modification on a Linux server (although path names may be a pain due to platform dependent file syntax).

As a general script language, Python 2.7 is my recommendation. You can pick it up, along with IDLE (its built-in IDE) from python.org. In the next year or so, expect version 3 to overtake it, but the differences, by then, should be easy enough to handle.

As for learning the language? No idea where to go... sorry. I learned it from the documentation included with Python, but its 'tutorial' is written more akin to a poorly indexed reference document. I would probably recommend something from O'Reilly or No Starch Press, but, again, I taught myself, so don't have any useful recommendations for specific books.


Just because Perl has a built in regular expression engine, doesn't mean that you have to use them a lot, and none of the Perl developers I know do. It works perfectly well on Windows too. As for JavaScript, errors tend to be invisible only for so long as you don't open the error reporting window if whatever engine you are running it on (the exception being old versions of Internet Explorer which do make it a pain to find errors). - Quentin
32
[-2] [2010-11-06 10:02:40] CYGAR

PYTHON

To learn this language go make an account at the ncss challenge website its cheap and makes it easy to learn.


33
[-2] [2010-02-25 17:02:30] Blanford Robinson

Perl has the best Libraries and packaging system. Python has the best syntax.


34
[-2] [2009-01-29 02:08:51] community_owned

I'm just starting to jump into the world of web scripting too and I just finished learning PHP. I obviously can't recommend it over any of the other ones, since its the first such language I learned, but I can say that I've had a lot of fun with it and it has A LOT of functionality. I find it hard to believe that any of these other languages have the same horizontal scope as PHP.

But again, I can't say for sure ;)

Good luck!


(5) yeah well believe it, LOL why make such a ridculous statement about PHP having superior functionality when you haven't learned any other languages - Rick
35
[-2] [2009-02-25 12:02:02] Sakthivel

I'd suggest you to learn JavaScript...


36