7 ms·
> Hmm it's not known for that, is it? It’s a hugely generalised statement so the real answer is “it really depends on your context” Is it fast compared to oth
by laumars 5y ago
> Hmm it's not known for that, is it?
It’s a hugely generalised statement so the real answer is “it really depends on your context”
Is it fast compared to other easy to learn languages? Definitely. Is it fast compared to other systems languages? Lol no. But is it fast to compile compared to other systems languages? Generally, yeah.
Is it easy to learn compared to other systems languages? Very much so. Is it easy to write complex low level systems logic? No. Is it easy to write dynamic code? No.
The problem with generalised statements against general purpose languages is that the scope is so wide that people will cherry whatever context they want to suit whatever argument (for or against) they choose.
- threeseed 5y ago> Is it easy to learn compared to other systems languages? Very much so. I think this is debatable and depends on your background. If you come from a Java/C background then many things are unintuitive e.g. error handling, dynamic interfaces, package/library management, whitespace parsing, style enforcement etc. Golang is easy to learn right now because it's basic like say Java 1.2. But since it likes to ignore what other languages do I wouldn't say it's an inherently easy language.
- Gravityloss 5y agoEven then, it's remarkably easy to read Go programs. This is very important.
- threeseed 5y agoI do code reviews for Go every day and it is easy but also frustrating and tiresome. The ridiculously antiquated error handling and the absence of modern FP constructs e.g. filter/map means that 1 line of Scala/Swift/Rust/Java etc code = 10 of Go.
- preseinger 5y agoThere's nothing "antiquated" about Go's error handling. It expresses a position that you might not agree with -- that errors are no less important than happy path code -- but that's not right or wrong, it's just a position.
- xyzzy_plugh 5y ago> e.g. filter/map means that 1 line of Scala/Swift/Rust/Java etc code = 10 of Go. Honestly, fuck this noise. I hope this never makes its way to Go. Densely packing logic is not inherently better. I've done enough Scala/Rust/Java reviews and those are frustrating and tiresome.
- jen20 5y agoOn the contrary I hope generics in Go mean that bug hives of mutation in loops get replaced ASAP with higher order functions. I for one have plans to work through several code bases and do just this starting the second Go 1.18 lands.
- cultofmetatron 5y agothe lack of filter/reduce and other higher order functions is precisely what keeps me out of go. I don't want to be restricted to what I learned about programming in my first year. Go forces me to code like a first year college student.
- ohCh6zos 5y agoThis was one of my huge struggles with Go before I just out and out gave up. So much 'good' Go code at my office was just CS101 spaghetti.
- cultofmetatron 5y agonot to mention, you don't gain much performance for it either. I can understand c or zig's choice of tradeoffs with simplicity being paramount when you're going close to the metal but for go's performance, Elixir, which is my daily driver, gives me comparable performance while giving me higher order functions, built in message passing, parallelism and actual error handling tools. Compared to GenServers, Tasks and Agents, go-routines and javascript async are toys, like fischer price vs fischertechnik. Go feels like a bunch of unneeded compromise for people needing to work with junior programmers. That said, if I needed a quick and dirty low level application for controlling an OS process or a lambda function on the cloud, I could see go's benefits. I could certainly build a poc faster than I would be able to in rust and the overhead of the runtime/startup is much smaller than elixir.
- ohCh6zos 5y agoGo is incredibly hard to read. There's no intentional. Everything from error handling to flow control to business logic all looks exactly the same. On top of that naming conventions and package constraints tend to absurdly long and verbose (and therefore hard to read) programs for what should be trivial.
- preseinger 5y agoObviously false (shrug)
- laumars 5y ago> If you come from a Java/C background then many things are unintuitive e.g. error handling, dynamic interfaces, package/library management, whitespace parsing, style enforcement etc. I’d argue that doesn’t make Go hard to learn, that makes Go hard to adapt to for people who are used to and like Java. Ie You’ve still learnt the language of Go even if you haven’t warmed to its idioms. But semantics aside, your comment here beautifully illustrates my point about how generalised statements can be skewed to suit any argument. Take your last paragraph where you used the term “easy” in a multitude of ways, each carefully selected to promote your existing opinion of Go: > Golang is easy to learn right now because it's basic like say Java 1.2. But since it likes to ignore what other languages do I wouldn't say it's an inherently easy language. This isn’t an impartial point you’re making. It’s an opinionated one. Which is fine in itself because you’re entitled to opinions but it does demonstrate the pointlessness of arguing about generalised statements where everyone is going to infer their own context based on their own biases. Ie Bob might find language X “easy” under a different context than Sally finds it difficult. But those context are not equivalent despite the adjective they’ve used being the same.
- deepsun 5y agoYes I saw that internally at Google in early days of Go, people often said that Go is going to replace either Java, or C++, depending on context. So I felt like it's going to take a niche somewhere in between those two..
- ohCh6zos 5y agoGo isn't even easy to learn compared to high level languages let alone system language. It is the only language I ever gave up on after 3 months of struggle I concluded I'd rather work with anything else.
- deleted 5y ago[deleted]
- laumars 5y agoYou’re conflating “easy to learn” with “easy to program for” sigh. And that wasn’t even the point of the post so you got that part wrong too. In fact did you even bother to read the thread before jumping in with that post? The point wasn’t whether Go is easy or not, it’s that “easy” means different things to different people (like here where you conflate “easy to learn” with “easy to use” thus “easy” meant something different to you vs the rest of the English speaking population). So arguing about a generalised term with zero context is stupid. Just as stupid as the editor wars of the 90s and Linux DE wars of the 00s. I guess some people just like to browbeat their peers into believing personal preference isn’t a thing.
- dustinmoris 5y agoWow, which language did you find easier to learn than Go? HTML doesn't count.
- ohCh6zos 5y agoThis is going to sound weird but I picked up both Rust and Erlang far faster than Go. Edit: my point isn’t that others shouldn’t enjoy it but it being easy is not universal or to be taken as given.