I'm interested in learning a programming language with support for GUI, multithreading and easy test manipulation (support for regex).
Mainly on Windows but p开发者_Python百科referably cross-platform. What does the Stack Overflow community suggest?
My suggestion would be Java. You can do all of that and much more.
I am a fan of Erlang:
Wx GUI tool
Regex (module regexp)
Cross-platform
Multi-threading (of course !)
EUnit testing
Of course Python is really appropriate too!
If you really like typing go for Java, if you really like whitespace go for python, if you like programming more than you like high performance go for Ruby.
Seriously, Java is very complete and very cross-platform. I don't know how Python adds up for GUI stuff but when I was looking at Ruby in detail a couple of years back it seemed a trifle complex ( or at least, nothing is hard to write in ruby but it didn't look easy to produce a nice, modern-looking UI ) but I much prefer what I can achieve with a scripting language in terms of lines of code compared with Java's painful verbosity.
Erlang, which I see recommended above, I've never tried but it's a language I would be very interested to learn. Possibly well worth looking into if you're learning something new anyway, especially if multi-threading is important to you.
Python is nice but has major problems with multithreading (unless you are using Stackless). it has nice support of multiprocessing, though. There're bindings to Tk (out-of-box), Qt, GTK and WxWidgets.
Ruby 1.8 has only green threads, and Ruby 1.9 uses native threads, but as @James Cunningham noted, it still has global VM lock, so it is limited in its concurrency too. It's the only of mentioned languages to have syntax-level regex support. AFAIK, it supports the same UI toolkits as Python.
Java supports native threads. It has two standard UI toolkits out-of-box (obsolete AWT and more modern Swing). There's also very popular SWT toolkit (Eclipse is developed with it).
If not you requirement of portable UI I would recommend you to use C#. It has more nice syntax then Java and generally less frustrating. But current state of UI on Windows and Linux is sad, unfortunately.
I would call Tcl/Tk a natural choice for the features you listed.
But might be called old fashioned.
- GUI - Tk, well integrated, looks okay if you know what your doing, you can also use Qt or gtk but thats a bit less common.
- Multithreading - Tcl has both CoRoutines for cooperative multitasking, message passing based threads that do not have a global interpreter lock and scale nicely and in addition a built in event loop to make you need threads less
- Test manipulation: you get a really flexible language to do test automation, add in the expect package and you have the tool of choice used for testing things like lots of routers, or with in the frame of DejaGnu the GCC testsuite for example.
Its usually easy to learn and has some cool features, but you won't usually find a job with it. The Tcl'ers Wiki is a good starting point, other points of interest might be The tkdocs homepage or the official language page at www.tcl.tk
精彩评论