|
|
|
|
|
by LeafStorm
4628 days ago
|
|
For me, it just feels like instead of taking efforts to carefully design the language, they just picked the first thing that worked and froze it. And while I really like some features of the type system (such as interfaces, lambda/function types, multiple return values, and the "type switch"), the lack of overloading and generics does have some pretty serious effects on readability (especially when you have compiler-supported functions that do overloading and generics, but don't allow it in userland). It also seems like the way they resolved a lot of issues in the surrounding tooling was to not decide. For example: how many spaces should we use? Screw it, we'll use hard tabs! How should we handle dependency loading and package management? Screw it, we'll hard-code the URL to our dependencies in the source code! How to handle dependency versions? Screw it, we won't! It's not a horrible language (like shellscript), but I think they wasted a lot of opportunity to make something better. |
|
> For example: how many spaces should we use? Screw it, we'll use hard tabs!
The only sane choice, and one that, again, goes back decades for these guys. You use one indent character per level of indentation. Boom. If you don't like seeing 8-wide tabs, fix your fucking editor. If you're worried about lining up all your code in perfect multi-line arrangements, maybe rethink your life.
> How should we handle dependency loading and package management? Screw it, we'll hard-code the URL to our dependencies in the source code! How to handle dependency versions? Screw it, we won't!
They should have never done the URL thing; it was a cute demo, but people took it as some sort of commandment to write code that way. If you want a real, stable set of dependencies with control over which version gets used, you should do what C and C++ programmers have done for decades and include the appropriate dependency source code in your distribution. Brad Fitzpatrick (core Go author) does that for Camlistore: https://github.com/bradfitz/camlistore/tree/master/third_par... and I do it for my own projects, if they're more than a quick test.