Richard Bucker

Golang Everywhere

Posted at — Jun 24, 2020

I still hate generics and I do not understand why devs think they need it. Java is already a run-everywhere language so there is no need to merely translate the java syntax to golang. And if the golang authors decide to incorporate generics; while I can do my work without generics it’s inclusion calls their judgement into question.

I have some shell scripts that I use for building, testing, deploying, etc my projects. Bash and ksh are fine for that sort of thing when you’re moving files or coarse grained operations. There is something to be said for being able to manage config files, flags, parameter parsing and the like; and most scripting choices are limited.

For example… some times I like to use sqlite DBs as part of the script and while I can execute SQL in bash as it’s the command line… it’s difficult to operate over columns and do math without passing the results to awk and then parsing the intermediate data… it just gets sloppy and adds tons of code.

In several cases I have converted bash to tclsh and that has been reasonable.

One of the cool things about tcl is that it works. It does math; comparisons; has plenty of libraries and so on. And it’s available on most operating systems. The only downside might be that it’s not cross platform (read Windows). But I’m not sure I care at this point.

Golang everywhere???

Well, golang does not really run everywhere the way java does but it does have a cross compiler.