4 ms·
Do you feel that golang is ugly?
- jeremiep 11y agoJust curious, I hear many people talk enthusiastically about the language, yet every serious critic of it I see runs along those lines and makes me want to skip the language altogether.
- quibit 11y agoJust try it out for a project or two if you're curious.
- jeremiep 11y agoThis is actually why I'm posting this, both Nim and Rust are higher on my languages-to-try list. Free time is sadly not unlimited and I'd like other people's opinions as well :)
- bsg75 11y agoTry it on a small project and decide for yourself. There are a lot of detractors repeating the same thing: "It does not have all the features of my favorite language X so its bad", while not explaining why they don't just use X.
- _ak 11y agoA lot of people are super productive with Go, despite all the detractors criticizing the (supposed) lack of people's favourite language features. That's reason enough to have a closer look. Conceptual purity doesn't buy you anything in the real world.
- TheCams 11y agoOne of the thing that annoyed me is that the language forces you to put your opening braces on the same line as your condition/loop. I like to have them on the same vertical line, I find it easier to see the blocks.
- michaelmior 11y agoI personally prefer to way Go does it although there are other formatting standards that are enforced that bug me. However, even if I don't like everything I am somewhat fond of the fact that this actually enforced.
- jeremiep 11y agoI don't mind that, after years of working in languages like Clojure, CoffeeScript, Python and Haskell (mostly for personal projects, at work I use C++/C#/Java) I now see braces as syntactic noise and use indentation to see the blocks. But that's just a matter of preferences. I'm more curious about Go on a semantical level. What does it make practical and idiomatic?
- billconan 11y agoExactly, I also find it easier to see the blocks.
- general_failure 11y agoI don't code much in Go but the thing that bothers me the most is the way variable types come after the variables names. What is surprising is nobody talk seems to be bothered by this at all....
- Retra 11y agoThat's actually the more 'normal' way of doing it. In type theory (or mathematics in general), you almost always write value: Type. (For instance F: A -> B.) This is how it is done in ML, Haskell, Erlang, Rust, Smalltalk, etc... It's mostly just C-like languages that do it the other way.
- dpc_pw 11y agoAs dayjob C coder, I just find the way types are written in C complete nonsense (especially when you start declaring pointers to functions), and no modern language should force that horror upon developers. Go types syntax is well done, IMO, even though I'm not into Go language that much (I rather Rust).
- _ak 11y agoThe good thing about how things are structured in Go is that you can read your types from left to right, while in C, you need to use a more intricate way of reading types... http://c-faq.com/decl/spiral.anderson.html http://c-faq.com/decl/spiral.anderson.html
- flippinburgers 11y agoI like the forced formatting: no more petty battles over what is "best".