14 ms·
> or making the language unacceptably crippled like Go Gotta say, I lost a lot of respect for the author at this point. It’s not like I don’t love Rust - quite
by jchw 7y ago
> or making the language unacceptably crippled like Go
Gotta say, I lost a lot of respect for the author at this point. It’s not like I don’t love Rust - quite the contrary - but if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight. Go has been one of my languages of choice for over half a decade now, and for good reason.
- viraptor 7y agoIt may be an unnecessary dig, but the author may indeed be familiar with Go and still think it's unacceptably crippled for all their use cases. The whole post is just their opinion.
- jchw 7y agoSure, and my opinion is that this is a very shallow takeaway. My whole comment is just my opinion.
- mav3rick 7y agoIt is crippled admittedly by the authors themselves. The error checking pattern, no generics etc. are all to keep it "simple" yet are things most other programming languages have. Have you used Rust ? The borrow checker makes a lot of sense.
- jchw 7y agoI feel like I shouldn’t have to answer this question, but Yes, of course I’ve used Rust. Why do you question this? I said nothing about Rust at all, other than that I like it, and whether Rust is good or not has little to do with Go being “crippled.” But of course, Rust is not flawless. In fact up until recently it was kind of annoying, before non-lexical lifetimes became a part of the language. It’s also a very large and complex language compared to Go. This is not unilaterally a bad thing, but just as every line of code comes at a cost, so to does every language feature, and if enough language features fail to pay the rent your programming language will end up feeling bloated. What Go lacks is exactly its strengths. If you criticize C for not having Java-style exceptions, people will look at you funny. There is some divide in the community over error handling but I defend that Go’s verbose and stupid error handling pattern is my favorite part of the language, and changed how I code inside and outside of Go. I also appreciate Go’s simple but effective patterns for composition-based object oriented programming, and for having a decent concurrency model (not that it is without flaws: the limitation of Go’s memory safety is definitely an issue here.) Everything comes at a cost. The borrow checker brings immense promise for security, but that does not mean other approaches to memory safety or language design are suddenly obsolete. It’s more complicated than that, and I consider failure to understand this to be a sign that someone is not keeping an open mind.
- enraged_camel 7y ago>>What Go lacks is exactly its strengths. Surely you understand that this is a very self-serving attitude, though? It's like someone points out that your car is crippled because it has a turning radius of 2 degrees and also has no brakes, and you go, "no but you see, what this car lacks is exactly its strengths! And it's those strengths that I enjoy the most when driving this car!"
- baby 7y ago“Crippled” has a negative connotation. I’d say it is not crippled but kept self-contained without a multitude of overlapping features.
- bsder 7y ago> if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight. Um, the whole point of Go was to be "opinionated and acceptably crippled". That's why the creators built it the way they did. Go has more than a few things where "Me, but not for thee" rules--the compiler can do X but you cannot. If you find that is an acceptable tradeoff for the other features of Go, great! Lots of modern languages, however, are trying to go the other way. They are trying to give the programmer every bit of power that the library/compiler programmers have. This has its own failure modes that you may find unacceptable. That's fine too. I personally dislike the Rust vs Go discussions. Those two languages in particular really don't have domain overlap and are like comparing apples to screws.
- legends2k 7y agoMinor nit: would've been better if you'd put 'screws and apples'. 'Rusty screws' and 'Go apples!' sound better then when interchanged :P
- root_axis 7y agoIn my anecdotal experience, the type of programmers that evangelize and talk shit about programming languages tend to be on the less informed side of the knowledge spectrum.
- AdieuToLogic 7y ago> In my anecdotal experience, the type of programmers that evangelize and talk shit about programming languages tend to be on the less informed side of the knowledge spectrum. Or maybe they have just expanded their "knowledge spectrum" and are experiencing an effusive moment?
- root_axis 7y agoTalking shit isn't effusive. It's possible to enjoy a programming language without openly denigrating others you regard as inferior.
- AdieuToLogic 7y ago> Talking shit isn't effusive. It's possible to enjoy a programming language without openly denigrating others you regard as inferior. Both points you make I agree with. I simply was offering a possible explanation for those whom exhibit overly passionate opinions when they become enlightened. When people take an epiphany to the point of denigrating those around them, then they likely have issues beyond what any programming philosophy could possibly encode.
- AdieuToLogic 7y agoIt's apparent you have dealt with negative situations such as you describe. Here is a haiku which may be helpful: Those who can will do, Those who cannot will seek to, Hide that fact from you. HTH
- vertex-four 7y agoI occasionally program Go because it has an amazing amount of libraries - I basically use it for random microservice type things that glue systems together. (Most recently, an HTTP login endpoint that sends and receives XMPP messages to authenticate the user.) I don't like it. I program Rust the rest of the time. I'm considering learning Perl5 so that at least my type system lets me do vaguely expressive things - I'm utterly fed up of half my code looking like: foo, err := something() if err != nil { return nil, someErr{err} } I got very used to Rust's try!() macro, now ? operator, and being able to map over Results to convert between error types in a single line that feels much less noisy - I have functions in Go that are a dozen or so lines that would've been 3 in Rust, and tbh I struggle to follow what the function actually does when 3 out of 4 lines are to do with the failure case. I would consider "unacceptably crippled" to be a reasonable description of Go, even if it's the best tool I have for some jobs.
- fortran77 7y agoUsing the word "crippled" is not in keeping with the Rust Code of Conduct. https://www.rust-lang.org/policies/code-of-conduct https://www.rust-lang.org/policies/code-of-conduct Hey @dang -- why do you and Hacker News think it's ok to make comments at the expense of the differently-abled, and when I call you on it, the post gets flagged? That's NOT OK.
- deleted 7y ago[deleted]
- baby 7y agoI work with Rust only these days, it’s really an awesome language and I wish everyone working with system languages would switch to Rust. Yet, I find Golang to be a much clearer language to read (and I read a shit ton of code). I hope they don’t add generics, but I wish they would options, results, sum types in general, redeclaring variables, the ? Operator, etc.
- emptysea 7y agoHow would Option<T>, Result<T, E>, and sum types work without generics?
- rumblefrog 7y agoEmpty interface perhaps.
- baby 7y agoNative support is the answer.
- saturn_vk 7y agoI doubt that any genetic syntax will significantly impact go readability. The only syntax overhead will be in type definitions, not in type usage, and the later is present a lot more than the former. Couple that with the current need to add extra type assertion on type usage, and you may be looking at overall readability improvement
- EdwardDiego 7y agoInteresting, I've been reading a lot of Golang of late as we move into k8s world, and I find it hard to read, mainly in terms of package layout - types and their related functions are often in very different places. But it's certainly less semantically dense compared to Rust or Scala etc.
- AdieuToLogic 7y ago> > or making the language unacceptably crippled like Go > ... if the only takeaway from Go for you is that it is “unacceptably crippled” then I feel you have missed a lot of insight. Perhaps the author used a poor choice of words and instead could have phrased their intent along the lines of: Go lacks the semantic density needed to express solutions in both a concise and consistent manner. Were this the case, it would be hard to disagree as Go does, indeed, lack linguistic capabilities present in other programming languages which enable developers to encode system constraints within the language itself. Some might see this as a benefit, but I do not. YMMV. A similar philosophy of "keep the language dirt-simple so anyone can code in it" was a driving force behind Java (the language) and JavaScript. What people have discovered is that when a programming language does not assist in expressing intrinsic problem complexity explicitly, it becomes implicitly intertwined within the source itself.
- ErotemeObelus 7y agoI think it's a syntax problem. ASCII doesn't have enough bracket characters to simply & clearly represent necessary language features. So it's harder for an intelligent human to sort and categorize these aspects. Pre-generics Java is about the appropriate amount of language complexity for our current lingua franca
- AdieuToLogic 7y ago> Pre-generics Java is about the appropriate amount of language complexity for our current lingua franca I am not sure to whom you are referencing as being "our", so I can only say I disagree as there are many developers which are quite adept in languages having more complexity than "pre-generics Java." Perhaps you meant to reply to a different comment?
- pjmlp 7y agoIt surely isn't mine, otherwise I wouldn't be happily using Java 13 right now. Also even Google does have more stuff going on Java, C++, Dart, Kotlin and TypeScript than Go, which has more uptake outside Googleplex.
- 7y ago
- crimsonalucard 7y agoGo is crippled. I know you disagree, but I can tell you why you disagree and why you are wrong. Simply put, you do not have enough knowledge to know why GO is crippled. Allow me to elucidate.. Imagine that you never knew about the concept of a negative number. You only knew about natural numbers. And for 5 years that's all you worked with... positive numbers. This does not mean you are inn-effective working with your positive numbers it does not say anything about your abilities at working with Natural numbers, you could be a an expert natural number mathematician. However it does say that you are missing knowledge about numbers and that your knowledge is in a way (crippled) Go is exactly this. Go is missing some very basic primitives that should be intrinsic to modern type systems in programming. If you had knowledge of "negative numbers" this would look like a gaping hole within GO's "number system." However if you have no knowledge of this, you would be completely unaware of the gaping hole and you could be unaware of it for half a decade. You may even get offended when someone comments on your knowledge being "crippled" Go is missing: 1. Enumerations... or some way of representing elements of a set within a type system. This is a fundamental concept needed to create a type. Unless you played with languages like Agda or Idris it's hard to see why enumerations are so fundamental and so important. 2. Sum types (while having product types) Go has structs but doesn't have Variant types which is a huge gaping hole in the type system as it uses products to return errors. 3. Recursive types. 4. Parametric Polymorphism (probably the most well known missing feature that is by many considered unneeded) You may not have fully understood all the concepts mentioned so I'm going to illustrate a very common problem go has that other modern typed languages don't have. The GO type system is not powerful enough to hold a JSON type because it is missing fundamental primitives of types. In python and javascript and ruby I can parse JSON and put it in a variable. In GOLANG I have to guess all the possible permutations of the incoming JSON type in order to hold it in a variable. This is 100% because GO is missing properties 1, 2 and 3 from above. There is no this in GOLANG: x := parseJSON("[1,2,3]") But there is in practically every other modern language.
- blub 7y agoRust was born as a critique towards C and C++ and putting down other languages is part of the community DNA. Go is a favorite target, but Python, Ada, Java, C# etc didn't remain unscathed either.
- zozbot234 7y agoGo is a fine GC language - in many ways, it's a lot better than the likes of Java! But it's nonetheless way too clunky for many use cases, which is what the OP may have meant by their remark. And the concurrency support comes with a lot of nasty pitfalls, especially compared to Rust or even Pony.
- EdwardDiego 7y agoCrippled is a good way of describing "use a map[T]struct{} when you need a set of T" in my mind.
- goto11 7y agoRegardless of the merit of his criticism, it clearly derails the whole discussion about this blog post, which was just about a cool feature of Rust.