I think there's a great value in code being straight forward and simple and that is very much not appreciated among many programmers. A good language enables you to "compress" your code without making the code flow impossible to follow. A bad language encourages you to obfuscate the flow of the program using wacky abstraction techniques. Go doesn't exactly hit the sweet spot for semantic compression due to lack of co…
I tried using Go this weekend and basically just abandoned it when I learned that it only had 'generic's for three built-in types and other than that you are forced to essentially dynamic cast everywhere. I just don't get the appeal. Go seems a lot like what you'd get if you just removed every language feature that anyone has ever complained about; for good reason or not.
Why we switched from Python to Go
161–170 of 406 posts
Re: Why we switched from Python to Go
#162Earlier quoted context omitted.
> this is solved with virtualenv Except when you run into edge cases, which happens all the time.
elaborate?
I don't have specific examples in mind but I've had a lot of frustrations with virtual-env.
Re: Why we switched from Python to Go
#163Earlier quoted context omitted.
> On the other hand, I've seen plenty of assertion based tests in other languages that report inane things like "1 != 2" or "true != false" when they fail. In Python, one would need to supply the message argument to avoid that. But Go seems no different, really; you still have to supply the message. My understanding of the testing package is that Python's: self.assertEqual(expect, actual, f'expected ({expect!r} != ac…
py.test does the magic walking, and it does indeed make for much less verbose tests -- no need to remember which self.assertSomething method to call either: x = 1 y = 2 items = [4,5,6] assert (x+y) in items Outputs this, replacing the variable names with values test.py:4: in assert (x+y) in items E assert (1 + 2) in [4, 5, 6]
Re: Why we switched from Python to Go
#164Earlier quoted context omitted.
And reddit. And a little thing called youtube (though to be fair last I read they're offloading a lot of the hot paths to golang and c via native modules).
Curious, where do you see that youtube is running Django? Python, maybe, but I don't think they run Django?
Re: Why we switched from Python to Go
#165Why does anyone write web apps in Python? PHP? Ruby? Modern Java and Go are so much faster than the alternatives that it's stupid to consider anything else if performance is important. Golang and Java can manage over a half million HTTP responses a second. Node is pretty fast but why bother when Java is many times more mature in features, tooling, and and supports concurrency... And uses less ram and is usually faste…
I think people obviously enjoy using Python/Ruby or whatever for small scripts, and by inductive reasoning they think they can enjoy programming even larger projects in these languages.
They also rationalize the slowness by pretending that performance doesn't matter or that the bottle neck is the database.
They abuse the adage about "premature optimization" being a bad thing. Not realizing that while it's stupid to prematurely optimize everything, it's equally unwise to write everything in a slow language. Using a fast language is not premature optimization; it's just the basic thing you need to do in order to not have a crappy optimization, which is a good thing , and everyone should do that.
Re: Why we switched from Python to Go
#166Earlier quoted context omitted.
That applies to all languages with exception of C, because they didn't want to standardize it as part of the language, hence we got ANSI C + POSIX instead.
Don't forget Javascript which is ridiculously under-featured natively. At least C has the excuse of having to run on the bare metal of a wide range of architectures.
Re: Why we switched from Python to Go
#167It is in the initial stages, but so far it has been pretty good - both as a learning experience and from a developer productivity perspective.
I've also open sourced a web app boilerplate that I extracted from GrowthMetrics' codebase - https://github.com/olliecoleman/alloy. It might be useful for people looking to get started with Go.
Re: Why we switched from Python to Go
#168I rather work in a language like Python or Kotlin where the code just looks like how you would think the code would like (if i would write it in pseudocode on paper)
However Go in big teams will really be nice. Thats why they invented it in the first place.
Re: Why we switched from Python to Go
#169Why does anyone write web apps in Python? PHP? Ruby? Modern Java and Go are so much faster than the alternatives that it's stupid to consider anything else if performance is important. Golang and Java can manage over a half million HTTP responses a second. Node is pretty fast but why bother when Java is many times more mature in features, tooling, and and supports concurrency... And uses less ram and is usually faste…
FWIW, it always seems like a mostly zero sum game to me. Whatever efficiency you gain in using (e.g.) Python+Latest Frontend Framework+Backend Framework, you lose through having to wade through yet another set of new concepts and documents for those frameworks.
Re: Why we switched from Python to Go
#170Python was my entry into the programming world, and I've been an evangelist ever since... Or I was until I ran into distribution and parallelism. Since then, Nim has been my go-to language of choice. It is all that Python was, plus unbelievable speed, compiling to shippable binaries, and some other cool language features that admittedly, are still beyond my scope of abilities. Still quite lacking in libraries compare…