i have used Go for the past two months now i don't know who this language is for it both treats you as too stupid and too smart at the same timehttps://twitter.com/AmyZenunim/status/1241069163772346369 …
-
Show this thread
-
so, it's no secret that the person who designed the language (Rob Pike) made it for programmers who are too stupid (sorry, sorry, he said "unsophisticated") to know what a good programming language is and it shows in droves
2 replies 0 retweets 6 likesShow this thread -
in Go, you're not allowed to leave an variable unused. ever. for any reason. the code will not compile. unused variables are not permitted. this has a number of knock-on effects. let's say i'm trying out a function from a library i've just imported. i don't know it very well.
1 reply 0 retweets 7 likesShow this thread -
so i import the package, and call the function with the arguments i think it needs, and assigning the output to the number of variables i think it wants. i don't know that the args i've given it are wrong yet. and i won't, for another ten minutes.
1 reply 0 retweets 5 likesShow this thread -
now i have to write all of the handler code for every single variable it assigns to. i have to copy/paste an `if err != nil` 3-line boilerplate. i have to printf every variable w/ the correct type. and then, after all that, it tells me the args are wrong.
1 reply 0 retweets 6 likesShow this thread -
so i fix the args. oh, well, the library wasn't terribly clear. i actually needed a different function, with different args, and different assignments. time to spend another 10 minutes writing boilerplate. but it's just like... how is this agile? how is this iterative?
1 reply 0 retweets 4 likesShow this thread -
obviously the language thinks i'm stupid, which is why it forces me into this workflow at gunpoint. it's not like C that lets you do whatever you want, including blowing your own foot off. but then it assumes you have the entire program mapped out in your head before you begin.
1 reply 0 retweets 6 likesShow this thread -
but having it all mapped out is not how an "unsophisticated" programmer programs. they rapidly iterate, try new functions quickly and haphazardly. so it wasn't designed for "unsophisticated" programmers. it was designed for smart supersenior programmers.
1 reply 0 retweets 5 likesShow this thread -
everything is regimented in its design to keep people from "hurting themselves, but its design is still inscrutable. it's like a strict teacher who thinks you're stupid but expects you to know everything. also it's basic Not Invented Here Google crap. idk. tastes bad.
3 replies 0 retweets 12 likesShow this thread -
Replying to @AmyZenunim
And it's not actually a safe language, you can cause data races that lead to invalid memory accesses with goroutines. Using only "safe" code. And yet its C interop is so hideously bad that you *still* can't do memory management sanely with it. Even with unsafe code.
1 reply 0 retweets 2 likes
I wrote one project in it, and ran into a runtime bug that had been open in their tracker for months. Took me 2 afternoons to debug it, and a month of bureaucracy to get the fix merged. I stopped using it, but still ended up finding and fixing another runtime bug years later...
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.