Saturday, March 23, 2024

Me, A GoNut?

It's early, and I don't know how far I can take this, but I'm looking at Go, the relatively new programming language developed at Google in 2007.

It resembles C, a lot. C was great for its time, and still is in some ways, but according to me it's hard to read and fussy to write. It also has a lot of issues like dealing manually with memory management, using zero-based arrays, and allowing easy access to unassigned memory, all of with cause endless problems.

Not to mention the critical difference between "=" and "==", which is a major flaw in the design of that language. Even people who have been programming in C for decades still absent-mindedly mistype this, and have to end up hunting down the obscure bugs that come of it. Other languages do this better.

But that's a thing. Only a thing. Not the only thing.

Go has some advantages. I'm early in my exploration and don't really have a lot to say except that I'm hopeful, mainly based on a couple of things I've seen early on.

One is the "gofmt" tool, which rewrites code into go's standard format. It's a "pretty printer", but with a vengeance. It does an end run around brain-fogging arguments about what is the right way to format code. With gofmt, you don't have to think about how far to indent code, or whether to use spaces or tabs, or which line to put the next brace on, because gofmt knows best, and its mind cannot be changed.

Pretty nice.

Another item is "fix" command, which updates packages to use new APIs. In other words, if you have a program written in Go, version X, and the current is Go, version Y, then you can us fix to update your code, or at least mostly. I guess the idea is that it does the most common, ordinary, and routine parts and leaves only the really tricky bits for manual updating.

Having done some programming in Ruby on Rails, I can say that I'm hopefully looking to having a tool to automate at least most of the update process. Ruby on Rails is tremendous in a lot of ways, but being notified by your hosting company that you must update your application, and then trying to hunt down all the little fiddly parts and packages and get them all re-wired again, after what may have been months or years without touching any of that, well, it's a bitch.

One reason that I'm playing with Go is the horribly convoluted swarm of pieces that is the Ruby on Rails environment. It's maddening. And then they have new things to simulate static typing, which is just there if you're using a statically-typed language to start with.

Yeah, so I'm hoping to Go with it then, become a GoNut. We all need something to shoot for, don't we?

 


Have anything worth adding? Then try sosayseff@nullabigmail.com
Me? Just about said it all, at least for now.

 

Etc...

so says eff: sporadic spurts of grade eff distraction
definitions: outdoor terms
fiyh: dave's little guide to ultralight backpacking stoves
boyb: dave's little guide to backpacks
snorpy bits: nibbling away at your sanity
last seen receding: missives from a certain mobile homer
noseyjoe: purposefully poking my proboscis into technicals