Can you tell us about how you use Go in the small? I like Go, but it doesn't strike me as particularly nimble for scripty use cases like this - error handling is part of it, but I know that's fixable with the Must() pattern.
Also, go run is almost like running a script.
package main
import "fmt"
func main () {
fmt.Println("hi")
}
// go run file.go
You can write this in any text editor, but using one with LSP support means that `import` statement is added automatically, and with CoPilot or another assistant, the `main` function writes itself as well as any `if err ...` statements. Go is extremely well suited to code generation due to how predictable it is.Adding dependencies with `go mod` is uneventful.
It will never be as 'scripty' as JS or Ruby, but the readability, safety and performance are totally worth it.
Is limited features (Go) gonna be better for AI generation then breadth of examples? (C#). I'm not sure.
puts "hi"
And the crystal version is just as typesafe and performant as the go version. I also find it more readable, but that is a very individual metric.As I mentioned, yes, it's verbose, but simple and worth the effort and peace of mind. My primary language is JS, I've written a fair share of shell and Ruby but would still choose go a lot of the time, just because it doesn't pull in any extra complexity.