4 ms·
I used to write a lot of personal Python scripts (ie ~/bin). I mainly did this because I seem to always screw up bash scripts and just can't remember all the co
by agentgt 11y ago
I used to write a lot of personal Python scripts (ie ~/bin). I mainly did this because I seem to always screw up bash scripts and just can't remember all the conditional flags ie ([[-z ]] and error handling with bash for me has always been tricky.
However in the last couple of years I have dropped Python in favor of Groovy in part because I know the JVM and its plethora of libraries so well. Groovy is a highly underrated language. Really my only complaint is the startup time is not nearly as fast as Python but it does seem faster than say Clojure scripts. Also one of the things that I have to say I sort of think Java got right is that it has always been backward compatible (I know this was sort of impossible with Python given its not really a byte code language). That is I really don't have to worry if I write Groovy in a pre Java 5 (ie without generics) where as with Python I wasn't sure if I should write new scripts in 3 or 2.
The other annoying thing albeit far less than Ruby is dependencies with Python. Groovy has a complete bad ass way of just declaring dependencies in a script (@Grab) and they will automatically be downloaded. I have yet to see a scripting language that does this (ie dependency install on demand).
BTW since apparently any time I mention Java-like-tech on any HN post I seem to get downvoted... I really really love Python. This was not to denigrate Python or that Groovy is better than Python.
- vorg 11y ago> I really don't have to worry if I write Groovy in a pre Java 5 (ie without generics) Groovy has many incompatible changes between versions, esp from 1.8 to 2.0 but also 1.7 to 1.8, 1.6 to 1.7, etc. Many sites provide Groovy 1.8 as the default because no-one there wants to bother with upgrading.
- agentgt 11y agoOh I guess its cause I only use it for personal scripts and only really started using it after Groovy 2 (although I used the language before I didn't switch from Python to Groovy till after Groovy 2). I am also not as Groovy as I could be (ie write like its Java at times) so maybe thats why I haven't ran into issues.