0

my development style brings me to write a lot of throw-away "assisting" code,

whether for automatic generation of code parts, semi-automated testing, and generally to build dummies, prototypes or temporary "sparring partners" for the main development; I know I'm not the only one...

since I frequently work both under windows and Unicies, I'd like to non-exclusively focus on a single "swiss army knife" tool that can work in both the environments with limited differences, that would allow me to do usual stuff like text parsing, db access, sockets, nontrivial filesystem and process manipulation

until now under unix I've used a bit of perl and massive amounts of shell scripts, but the latter are a bit limited and perl... despite being very capable and having modules for an incredible array of duties, sincerely I find it too "hostile" for me for something that goes beyond 100 lines of code.

what would you suggest?

scripting is not a requirement, it would be ok to use more static-styled languages IF it makes development faster (getting programs to actually do their work and possibly in a human readable state) and if it doesn't become nightmarish to handle errors/exception and to adapt to dynamic environments (e.g. I don't like to hardwire data /db table structure in my code, especially by hand).

I've been intrigued by python, ruby, but maybe groovy (with its ability to access the huge class library and his compact syntax) or something else is better suited

thanks a lot in advance!

(meanwhile, on a completely different note, scala looks really tempting just for the cleanliness of it, but that's - probably - a completely different story, unless you tell me the opposite...?)

skaffman
  • 398,947
  • 96
  • 818
  • 769
user120747
  • 169
  • 1
  • 8
  • A bit of a subjective question. Also quite similar to ["which scripting language is best"](http://stackoverflow.com/questions/70453/which-scripting-language-is-best), ["which scripting language should I choose"](http://stackoverflow.com/questions/6028414/which-scripting-language-should-i-choose) – jwd Sep 28 '11 at 18:10
  • it's unfortunate but it has to be subjective, since we are trying to somewhat "people performance using the tool" and not the performance of the tool itself (e.g. http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=all , but about developers who like to think ;) ) – user120747 Sep 28 '11 at 19:28
  • three very useful replies (thanks a lot!), I think I'm going to go the python route even though I suspect that my way of thinking code is much more ruby-like. but as a practical tool, and not as a preferred language, reading your comments, python might suit better my needs. I'll continue to follow this thread, so if anyone wants to add more, I'm eager to read it ;) thanks again – user120747 Sep 28 '11 at 19:51

3 Answers3

1

Python is arguably one of the best choices. Its biggest benefit is that it has a huge built-in library for doing all sorts of stuff. It is also mature, very cross-platform, actively developed, and has many support options (mailing lists, newsgroups, etc).

In addition, it has a built-in GUI toolkit (tkinter) for those times when you need to write a quick GUI to get input from a user or display output from a running process. And if you don't like tkinter, there are other cross-platform GUI toolkits available.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
1

I suggest Python.

For me it has a sweet spot of good libraries, documentation, community, cross-platform functionality, and ease of writing/reading.

It fills a similar niche to Perl's, but if you find Perl to be 'hostile' for longer scripts, you will probably like Python, especially when compared to Ruby, which feels more Perl-y, IMHO.

As an aside, all of these are quite easy to just try out - why not do that?

Then you can decide for yourself instead of trusting the questionable wisdom of an online forum (:

jwd
  • 10,837
  • 3
  • 43
  • 67
1

I think that Python and Ruby are your best bets, depending on exactly how you think and code.

I personally find Python EXTREMELY readable and its syntax is highly intuitive. I've heard Python described as "pseudo-code plus colons."

On the other hand, once you get around its slightly bizarre syntax, Ruby makes for high-speed development. It's built around DRY principles and convention-before-configuration, which is great for rapid prototyping.

There are other languages--especially Haskell and the Lisp dialects--that can make for super-rapid prototyping, but they don't have as large a supportive community, so there's a shortage in library and discussion supply.

wmjbyatt
  • 686
  • 5
  • 15