In terms of Boy Scouts, Python is the kid with strict dietary requirements who insists the other boys eat his crappy food, just because.
In terms of Boy Scouts, Python is the kid with strict dietary requirements who insists the other boys eat his crappy food, just because.
> 2to3 -w foo.py
Moreover much of the new Py3 syntax has been usable in 2.x for 10+ years with __future__ imports. There's little excuse for not taking advantage of it.BUT - Python is a great language for scripting. If you need to parse some stuff, produce a result ... Python is it.
The documentation bytes, I'm not a big fan of how it scales, packages are clumsy, deployment can be clumsy, but if you can get past those things, script away.
As far as brackets: in the long run I think it's better. I was very resistant to it at first. But then I came to prefer it.
I actually wish Java had a bracket-less option.
If Java had that, plus simpler file access, plus amazing array and string access ... man, that would be great.
Even though those are 'small things' - in reality, a lot of scripting code is filled with that, so it really adds up.
Going one step further ... maybe heretic - but having worked with a lot of Javascript ... I suggest that some loose data typing options would be great as well.
JSON in Java is a goddam pain. JSON and Javascript is seamless.
A lot of front-end programming is very data centric, but in the 'micro sense' i.e. passing around a lot of little bits of data. Also, it's highly event drive and async, which JS does well. So - also add more seamless async (Java Lambdas approach this) - and voila, Java could be better for UX type things as well.
But languages don't evolve very well, sadly :) it usually takes someone to come along and reinvent it using best practices and maybe a big company to support it, and it takes years to get to maturity.
Either that or to create a highly 'proprietary' version of something, a-la Microsoft.
That's really interesting to me. I feel almost exactly the same way about Perl. It has a heap of rough edges and things that are "imperfect" but when I need something done quickly (i.e a quick script to parse some text) I reach for perl. Strange how conceptually they are very different languages but have converged...
Jython is much older and more stable than Apache Groovy, and is bracket-less so there's no "almost but not quite" about it. It only exists for Python 2.x, not Python 3, which is a result of its stability.
Languages that have a more strict and less dynamic structure would likely have more difficulty working with JSON. On the other hand, give me an xsd and I'll generate some not awful Java. Consider the joys of JavaScript where one has to validate against an xsd.
Might I introduce you to Groovy? http://groovy-lang.org/json.html
Unlike with Javascript, JSON is not a subset of Apache Groovy syntax, which also makes it have difficulty working with JSON.