Great tool, two big negatives. First, checking result values is dumb. It adds 50% more code. Add exception handling. Second, the way imports work is obviously due to some internal google kitschy-ness. Remote import paths are so dumb. People set up entire domains and CDN's just to host some code. The import path has to have a specific format, you can't have three levels. github.com/me/sub1/module won't work, so everyo…
Ask HN: Go programming language is over ten years old. What do you think of it?
121–130 of 310 posts
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#122Earlier quoted context omitted.
But...you are comparing a web framework with a Go's standard library. I mean, it's not a fair comparison. I'm pretty sure there are Go modules that support those handy things.
doesn't go stdlib contain an http server library "that you are supposed to use in prod"?
Go is not about abstractions, Go is about solving problems here and now.
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#123When a struct implements an interface one has to keep guessing that it really does so (unlike Java, C++ there is nothing in the syntax of go that would show interface inheritance as a fact), and that really doesn't help the poor guys who have to read/understand/maintain some code. Why did they do that to a language that is based on interfaces?
If you want to explicitly declare that you implement an interface.. just put it in the comments, or it's common to see a line like this after a struct declaration:
var _ C = (*A)(nil);
It's a way of asserting that A satisfies C.Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#124Earlier quoted context omitted.
Because 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 im…
Rust 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).
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#125Earlier quoted context omitted.
Rust 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).
It 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.
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.
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#126I really appreciate the simplicity, I think it totally makes sense at work where not everyone wants to deal with weird code. I think maintaining old golang code will not be a major problem in the future for example. The garbage collector make things a lot simpler too.
The dependencies management is not great compared to npm/crates/rubygems/... but it's still better than the Java world and it exists and it's being used.
I wish generics were already there, and I'm not a fan of the interface{} keyword. I'm also sick of the if err!=nil everywhere, I wish it could have a better error management like Haskell/Elm/Rust/...
I use Rust in my latest personal projet and while I prefer Rust, it's a bit too complex quite often and I spend more time thinking about rust things than thinking about the problem I'm solving.
This is not the case with Golang. It's not a fun programming language but it does most jobs very well.
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#127It's a real good Java
Java is actually better(faster runtime and less energy usage) than Go but where Go beats Java is memory usage. C beats all of course. https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/pap...
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#128It’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…
Go 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).
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#129It is a great alternative for things that otherwise you would build with C++,C or Java. Not so much for things you would otherwise build with python, ruby, etc.
Re: Ask HN: Go programming language is over ten years old. What do you think of it?
#130I am far more interested in cutting edge languages such as Rust (borrow checker) or Idris (dependent types) or even C++ 20 (template madness), since these will allow me to express things that I cannot express in other languages. What does Go bring to the table?
Note that my perspective is of someone who works in a small team of experienced programmers, not a large organisation with more junior ones.