News for hackers. Stuff that matters.
Re:Python Is Easy. Go Is Simple. Simple != Easy by throwawa14223 on Monday November 27, 2023 @12:50PM (#38435525)
Ok that's totally fair. What's the Go name for it? In my mind Go interfaces are duck typed.
Re:Python Is Easy. Go Is Simple. Simple != Easy by sethammons on Monday November 27, 2023 @12:58PM (#38435645)
mostly 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)`.

Re:Python Is Easy. Go Is Simple. Simple != Easy by pydry on Monday November 27, 2023 @01:41PM (#38436307)
The 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.

Re:Python Is Easy. Go Is Simple. Simple != Easy by kietay on Monday November 27, 2023 @01:53PM (#38436508)
Python 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.
Re:Python Is Easy. Go Is Simple. Simple != Easy by pydry on Monday November 27, 2023 @04:11PM (#38438345)
I can write stringly typed code in haskell too if it comes to that.
Re:Python Is Easy. Go Is Simple. Simple != Easy by Biganon on Monday November 27, 2023 @02:14PM (#38436808)
Don't you need stumps which are quite often not available?
Re:Python Is Easy. Go Is Simple. Simple != Easy by lokar on Monday November 27, 2023 @12:58PM (#38435650)
What were they actually doing? Passing interface{} all the time and casting it?
Re:Python Is Easy. Go Is Simple. Simple != Easy by throwawa14223 on Monday November 27, 2023 @02:09PM (#38436732)
Haha you're spot on. In the codebase I inherited that was everywhere.
Re:Python Is Easy. Go Is Simple. Simple != Easy by lokar on Monday November 27, 2023 @02:39PM (#38437123)
You can do crazy things in any language if you try hard enough.
Re:Python Is Easy. Go Is Simple. Simple != Easy by Cthulhu_ on Thursday November 30, 2023 @09:47AM (#38474156)
The trick to efficient Go is to not try hard, lol
Re:Python Is Easy. Go Is Simple. Simple != Easy by mathisd on Monday November 27, 2023 @01:02PM (#38435703)
Python is duck typed as it support dynamic type, whereas Go doesn't. Yet you can do polymorphism in Go and aside that difference I think Go interface are duck typed.
Re:Python Is Easy. Go Is Simple. Simple != Easy by theLiminator on Monday November 27, 2023 @02:26PM (#38436953)
Probably structural typing?