Python is valuable due to the ecosystem of libraries it offers. The language itself is extremely poor. I think this is not something most Python users are aware of since if you are doing ML, data-science or simple scripting there is little reason to step outside of the ecosystem. - Weird scoping rules - Very limited list-comprehensions - Ability to monkey patch things is a liability - Mutability by default - Lack of…
Python Is Easy. Go Is Simple. Simple != Easy
121–130 of 313 posts
Re: Python Is Easy. Go Is Simple. Simple != Easy
#122* Values are immutable
* Functions are pure (i.e. no side-effects)
* Functions are values (i.e. can be passed as arguments to other functions)
Re: Python Is Easy. Go Is Simple. Simple != Easy
#123Earlier quoted context omitted.
I tried Go for about a day, and the exception handling and null-pointer issues were exactly the things that made me lose interest.
I can understand why you felt the need to share that, but if you only used it for about a day, aren’t you just reporting your initial impressions? If I used Rust for about a day, I would probably complain about the borrow checker. And if I used Python for about a day, I would have no idea what people are talking about when they complain about package management in Python.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#124Earlier quoted context omitted.
I used Go for many years. My issue is that it's _almost_ a great language, but in its current version it's just a collection of foot guns that makes it difficult to get shit done. Go doesn't have some of the most library functions, so large codebases shared between teams end up with a dozen different implementations of functions like "minimum" or "filter". Good luck debugging a bug in one of the implementations. The…
I feel like the pointer stuff you could handle safely in a modern language. Because I think pointer and array notation are convertible so one isn't scarier than the other. But yeah not being able to tag pointers as 'can't be null' and have the compiler enforce that ignores everything we've learned in the last 40 years. You shouldn't be able to pass a potentially null pointer to a routine that can't deal with it. You…
Re: Python Is Easy. Go Is Simple. Simple != Easy
#125Re: Python Is Easy. Go Is Simple. Simple != Easy
#126Earlier quoted context omitted.
Don't forget the fact that it doesn't have this overbloated concept of inheritance and polymorphism of let's say Java where you have to look through 6 files to understand what's even going on. Even generics in Go were a heated debate because they make the language more complex. All in all Go was created by geniuses and it shows.
> geniuses That's very strong language. Go was created by some smart people that have completely ignored programming language developments that happened after the 70's.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#127Earlier quoted context omitted.
> I need to make a change across both of these modules. Will my compilation pick up the changes? Yes, add a replace directive to A's go.mod and point it to B's directory. It'll pick up changes immediately. You can also vendor + disable modules + change stuff in the vendor folder to quickly experiment, though IDEs tend to get moody about this. Backwards incompatible in principle: release a new major version of B. Impo…
Ok, I wasn’t able to figure that out when I was in the codebase. What do you do if you’re working in a fork of the project and you need to make those changes?
E.g. clone A and fork-B into adjacent folders regardless of fork status or import paths, and change A/go.mod to include
replace original.com/B ../B
and that should work fine.With GOPATH you would need to clone the fork into the original path. Which you can do if needed / modules don't prevent that either, but modules don't need any specific locations at all.
---
The official module doc is... huge and doesn't spell things out in an easily-usable form, so you're far from alone in your confusion, but I do think it's worth reading. I routinely find people spending way more time struggling with them than it would take to read the spec and become an expert on it: https://go.dev/ref/mod
Re: Python Is Easy. Go Is Simple. Simple != Easy
#128Earlier quoted context omitted.
I 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.
It 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.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#129A VC once told me that as a rule, Go startups were more likely to succeed than Python startups. Maybe because successful startups are working on simple problems, not easy problems.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#130Earlier quoted context omitted.
Write more libraries of common tasks you have to do constantly. If you're not abstracting your chores, you've been doing it wrong.
Go fought me at every step trying to abstract away boilerplate.