4 ms·
It’s a unique and different language that clearly hit some kind of niche. It’s great when a language has any users and this one has quite a bunch. That’s super
by pizlonator 6y ago
It’s a unique and different language that clearly hit some kind of niche. It’s great when a language has any users and this one has quite a bunch. That’s super cool!
Personally I don’t like it. Not low level enough for when I need to go low level, not high level enough when I want to go high level. Also I would have wanted generics right from the start; that should be the norm for typed languages unless the types are really super simple (Go’s are complex enough to warrant generics in my opinion).
But, maybe the reason why Go has the niche it has is because other programmers prefer it the way it so. So it goes with languages - it’s an aesthetics thing just as much as it is a technical thing.
- ra7 6y agoGo has wide enough adoption that I don’t think you can call it niche anymore. It’s become somewhat of a de-facto systems/infrastructure programming language and is replacing Python in a lot of places where it was traditionally used for automation. The language is simple, performant and writing concurrent code is intuitive (although I feel Go developers tend to get carried away using channels/goroutines).
- lanstin 6y agoBecause every time I need to use a lock I know I am not smart enough to do so. Channels and go routines, I can reason about. (Tho they are slower - I have a runtime stats package that just stuff the numbers into a channel and then returns to the calling goroutine. I did an implementation using Atomic’s and it could sustain like 20x more calls per second before using all the callers CPU. But I still use the channel implementation.
- nicoburns 6y agoRust is ideal for this scenario: it lets you use the faster locks / atomics, and the compiler will check everything for you (assuming you can use a standard implementation rather than needing to implement your own - but there are well tested libraries for most common use cases).
- lanstin 6y agoIt is on my list of things to learn but learning go made me so happy the urgency has decreased. Did they ever finish that rewrite of the core unix cmd line utils from C to Rust? Like find and if config etc. a rust busybox I guess.
- nicoburns 6y agoIt's not finished, but a decent amount is implemented: https://github.com/uutils/coreutils https://github.com/uutils/coreutils In general there has been more effort put into trying to improve on the default tools through projects like ripgrep (grep), bat (cat), lsd and exa (ls), and fd (find) rather than creating drop-in replacements that don't provide all that much over the battle tested originals.
- ra7 6y agoOh, I didn’t mean lock vs channels/goroutines. I meant in general prematurely optimizing by using Go’s concurrency primitives. It’s so easy to goroutine-ize a simple for loop with a waitgroup, but it can quickly get complicated with stop channels, cancellations, error handling/propagating, graceful shutdown which is then a source of bugs.
- lanstin 6y agoIf guess if you don’t need concurrency just use Python :) I have fifty AWS utils in python and just 2 in Go.
- pizlonator 6y agoI did not mean niche in a small way. It is a big niche. Maybe I could have used a better word.
- lanstin 6y agoTo me it is a modern C with the lessons from Python learned. It is simple in the ways C is and the gotchas are all things i do naturally based on C. I like having structs and like having to check errors in each call. It forces one to concretize the idea that any reference to anything off of the CPU or the RAM might do anything. You have to have an error strategy for robust code. I don’t think people complain that Linux code does a lot of error checking. To be sure I mostly use to for network servers or making a lot of network calls quickly. (E.g. I have tools to do stuff in AWS that can reliably get S3 to start throwing 503 errors in Go. But they can re-encrypt a ton of data using one host and a small amount of time.
- whimsicalism 6y agoEntirely agreed. I'm relatively new to Go, but it strikes me as very much like a modern C. But, personally, C can get really tedious.
- djeiasbsbo 6y agoI agree as well. Going from C to Go as still a newcomer to C, I liked that Go seemed to be more "defined". For example that there is one style and doing something like placing a bracket differently results in a syntax error. This is good for newcomers because different styles and philosophies about a language can quickly make one feel lost. For me, C only seems tedious because to every question I have about it, I will inevitably find 10 different answers, maybe all from different periods of time. And I understand that I can look at the C standard but there are things that it doesn't address. Also, venturing into embedded programming, you can quickly come across implementations of the standard libraries that aren't nearly as well-defined. So considering these things, I think it is a good "modern C" as long as you don't go too low level.
- pjmlp 6y agoWhat lessons of Python? Go is basically Limbo with Oberon-2 syntax for method receivers.