3 ms·
As someone with the misfortune of inheriting a million plus loc Go project I disagree. Go is a nightmare from the duck typing to dependency management.
by throwawa14223 3y ago
As someone with the misfortune of inheriting a million plus loc Go project I disagree. Go is a nightmare from the duck typing to dependency management.
- phplovesong 3y agoI assume your only part of a larger larger team working on this 1M LOC project? If you are alone with no previous context/knowledge the language does no really matter, you would be in a world of hurt nonetheless.
- throwawa14223 3y agoI agree with you but that pretty much invalidates Go. The whole selling point is that it is lacking anything to make the language interesting to use but you can drop in and any two Go programmers write the same understandable code.
- bogota 3y agoI assume with the duck typing you are talking about interfaces? How has that caused issues? With huge projects that pull in packages i have seen the dependency management become a mess but most of the time its not that bad.
- throwawa14223 3y agoIt was sloppy coding on the project I took over, but it still made me wish for explicit style interfaces. Cleaning up frequently broke the project in non-local ways, because someone would break an interface without meaning to.
- rplnt 3y agoUnless you are doing some (possibly unsafe) magic the interfaces are strongly typed, external dependencies are locked, so one cannot really break an interface without meaning to. Or I guess without realizing it immediately.
- throwawa14223 3y agoI ended up ripping out the unsafe magic, but it was a huge pain while it existed.
- jeromenerf 3y agoTo be fair, most million plus LOC projects match “misfortune” and “nightmare”.
- throwawa14223 3y agoGo is verbose, a million plus LOC doesn't go as far as it would otherwise.
- jeromenerf 3y agoI don't know, my experience with mega SLOC projects were Java, so verbosity was also a thing. Go's verbosity is usually found in multiples (if err), not in long forms (int[] arrayOfIntegersWithValuesOneToFive = new ArrayFactory().createArrayWithSize(5).populateWithValues(1, 2, 3, 4, 5); ).
- sethammons 3y agoI think you typed "python" wrong :) Duck typing is a python thing. And the dependency management is a nightmare, constantly breaking. To the article's point - you _must_ run it in a container and defer to the OS to have anything resembling a sane development story.
- throwawa14223 3y agoOk that's totally fair. What's the Go name for it? In my mind Go interfaces are duck typed.
- sethammons 3y agomostly joking - your complaints are big problems in python. Dependency management in Go has been contentious (historically) with "to vendor or not to vendor", glide and dep, GOPATH, etc. But that is all solved. Go mod for the win. As far as "the nightmare of {using interfaces}" -- I have no clue to any controversy there. It is one of the most celebrated features of Go. Not sure where you were going with that. In Python, I do find duck typing to be a nightmare because you don't actually _know_ what you have. Can you change it? Try it and if it breaks you will know. Or you use it like a list but it is a string and that gives strange, unexpected behavior, so you end up doing things like `param=force_list(maybe_string_or_list)`.
- pydry 3y agoThe Python typing nightmares you refer to go away on large projects as soon as you start using mypy, which I tend to find most large projects do these days. So yes, you can change that string and you do know. It's still better that it's optional and gradual - it's unnecessary overhead on smaller projects, spikes, notebooks, etc. which are what most big projects grow out of.
- kietay 3y agoPython typing nightmares definitely do not just go away with the use of mypy. There are so so many ways to break out of the guardrails it supplies that are not caught.