Richard Bucker

As golang considers version 2.0 I'm considering something else

Posted at — Oct 25, 2016

As the golang considers version 2.0 I’m starting to wonder if it’s time to leave. Golang has been around for 4 years and I have made a decent living using golang for all my server/framework projects. However, for two major reasons it might be time to start something new.First of all many developers that were once java joined the golang ranks. This was not a bad thing but they brought their bad habits with them; for instance generics; which has been a contested feature currently omitted from the language. Second, in the last two years I have had tremendous success with my own DSL and there was something valuable to learn from the TH1 project.Here is my first shortlist of languages under consideration:th1 - from the origins page this seems like a good strategy. I don’t particularly want to write scripted code but th1 makes the cae for forking a lightweight scripting language, code generation, embedded runner.tcl - there is still an active tcl community and activestate is still releasing updates to its toolchain. These tools could bridge the learning gap between th1 and jim.jim is a small version of tcl. It might have been intended for embedded systems, however, it’s small footprint means it’s going to cross compile well. nim - demonstrates principles of the proper toolchain. Take essentially an immutable languate structure and transcode it to some other language which is then statically compiled for distribution. However, I really need more data driven code generation and templating. But sadly it only talks to MS SQL Server through ODBC.perl 5 or 6 - I originally abandoned perl 5 when I started reading about perl 6. Given all of the perl6 project overruns I’d heard that the project was now redefined as “Perl 6 is a sister language, part of the Perl family, not intended as a replacement for Perl 5”; which means p5 is not dead and p6 lives too. p6 is still early and uninteresting as it’s based on a VM and can use the JVM (all part of the projects overruns). Since p5 will likely live on it’s still viable however even the CPN is showing it’s age and then there is still the issue of huge dependenciespython - not being considered. tabs vs spaces is a pain in the ass.lua - the source is only 24000 lines of C and that in itself means it’s not unreasonable to fork or embed. There are a number of interesting side projects like a jit and their own package manager. And it’s license is not GPL. One thing that makes it interesting is that it was used as the scripting language in World of Warcraft and Lightroom. This makes the barrier of entry lower for new programmers. but alas it has poor SQL Server support and one core library was 12 years old with no updates.julia - “Like Lisp, Julia represents its own code as a data structure of the language itself. Since code is represented by objects that can be created and manipulated from within the language, it is possible for a program to transform and generate its own code.” But alas uses ODBC.rust - too early to tell and DB support seems weak.some research on xenLING (erlang on xen) - erlang has crappy DB support[elixir on xen] … elixir - while it’s not specifically “on xen” it uses erlang and is essentially some ruby looking junk on the erlang vm. And their DB support is no betterOCaml - only access through ODBC.lisp anyone? I just do not feel the love. Looking at some modern variations many rely on the JVM and it’s also an elitist language. I’ll just have to face facts that it’s not going to help a team.lastly a full DSL. My first search generated a result set that was dominated by Microsoft and Visual Studio. That’s spooky and undesirable. So I went back to activestate which I recall had a DSL framework and it seems to be absent and a search did not unearth it.One possibility here might be something that looks like homegrown lua interpreter like the one in golang. It might also look like something like what julia or lisp describes in their code generation and adding that functionality to lua or tcl directly.As a side note. Just as I was writing this post and reviewing th1 I also rekindled my love of fossil-scm. It’s not a perfect scm but it works great and is unencumbered by licensing and uses sqlite under the covers and implements a wiki, trouble tickets and uses th1 as a scripting language. Making encapsulated projects possible and easy.I’m getting tired writing this post but there is one elephant in the room. Nodejs and it’s cousins. If I recall there is a SQL Server driver from Microsoft and maybe others. I called it out once and got some trolls in my head. But the problem may still be the execution model in that javascript is single threaded and iterating over a recordset is problematic. (I’ve forgotten the name of that crazy code structure but something like promises and nested callbacks).One real possibility might be to write my own language that compiles to JS assuming I can get around all the junk and find the right vanilla packages so that the dependency cruft does not pollute the project. The Hapijs project seems to be alive and there are plenty of other projects that are useful and active. It’s also a fairly low bar to entry but is it too low?Dart was always a promising javascript cross compiler language thing. It’s package system indicates ODBC only.Well, I have not answered any of questions and while golang 2.0 is still in discussion so is this.