Live data from Hacker News

Go + Services = One Goliath Project

engineering.khanacademy.org

81–90 of 449 posts

Re: Go + Services = One Goliath Project

#81
post #75
post #62

> Now, in 2019, Python 3 versions are dominant and the Python Software Foundation has said that Python 2 reaches its official end-of-life on January 1, 2020 , so that they can focus their limited time fully on the future. Undoubtedly, there are still millions of lines of Python 2 out there, but the truth is undeniable: Python 2 is on its way out. The Python 2/3 split is by far the most annoying thing about Python. I…

If you're installing a package via the package manager, it will very quickly tell you if you can install it on your specific version of python. Unless you're downloading some rather obscure and un-loved library where the author didn't explicitly state which versions of python they support. Multiple package managers: There has only been 2 big ones from my long-term general usage of python. Easy-install and pip, the fo…

> Unless you're downloading some rather obscure and un-loved library where the author didn't explicitly state which versions of python they support.

I take it that you've never tried the obscure and un-loved pwntools package :)

Re: Go + Services = One Goliath Project

#82

Ok this is going to sound ignorant, as my only experiences in backend services have been Go and Python. I don't like either. Is there something I'm missing? For simple CRUD apps, both are sufficient. But (in my limited experience), the moment I've wanted to create more complex business logic with stricter constraints, neither has been quite up to the task. Go doesn't make things easy. It asks you to repeat yourself.…

Go seems to be optimized for onboarding new developers (particularly straight out of school) quickly, rather than for the long term comfort of developers using it. There are Rob Pike quotes that speak to the first part of that at least. If I was a business owner, I'd love Go. But what I can't really figure out is why so many devs love it. It's far from the worst thing in the world, I don't hate it, but I just can't g…

The performance of Go is not particularly impressive. Especially when it is used to write busy servers with many simultaneous requests. And as a language it is not inspiring either.

Not sure why business owners should love it either. Not enough features in the language coding productivity suffer in a long run. Also if the developer needs Go because other languages are "too complex" maybe said developer can't produce proper code anyways.

Re: Go + Services = One Goliath Project

#83

Earlier quoted context omitted.

You had me nodding in agreement until the last paragraph. Functions are first class in Python. You can pass them all over the place and use them the same way you would in JS. You don’t have Lodash but frankly it’s not needed. The stdlib, functools and itertools are pretty much all you could ever ask for.

I think I meant the treatment of anonymous functions - lambdas are limited compared to normal functions.

The lack of multi-line lamdas is one of my biggest gripes with python.

Re: Go + Services = One Goliath Project

#84
post #69

Earlier quoted context omitted.

If you need more power than a lambda you would use a nested function, e.g. def a(n): def b(): print(n) return b

That's a lot of boilerplate for a closure…

The trivial lambda case is short, and you can do what the parent said if you want to do something that doesn't fit into the trivial lambda case well.

Re: Go + Services = One Goliath Project

#85

Earlier quoted context omitted.

That's a lot of boilerplate for a closure…

def a(n): return lambda: print(n)

That's a couple characters over most languages I normally use. Plus lambdas have a number of strange warts and restrictions (no multi-line lambdas?) that leave me feeling that Python really dislikes traditional functional programming constructs.

Re: Go + Services = One Goliath Project

#86
post #84

Earlier quoted context omitted.

That's a lot of boilerplate for a closure…

The trivial lambda case is short, and you can do what the parent said if you want to do something that doesn't fit into the trivial lambda case well.

The "lambda" keyword isn't :(

Re: Go + Services = One Goliath Project

#87

Ok this is going to sound ignorant, as my only experiences in backend services have been Go and Python. I don't like either. Is there something I'm missing? For simple CRUD apps, both are sufficient. But (in my limited experience), the moment I've wanted to create more complex business logic with stricter constraints, neither has been quite up to the task. Go doesn't make things easy. It asks you to repeat yourself.…

You had me nodding in agreement until the last paragraph. Functions are first class in Python. You can pass them all over the place and use them the same way you would in JS. You don’t have Lodash but frankly it’s not needed. The stdlib, functools and itertools are pretty much all you could ever ask for.

If you add in Typescript as he said, is a much better proposition than mypy.

Re: Go + Services = One Goliath Project

#88
post #69

Earlier quoted context omitted.

I think I meant the treatment of anonymous functions - lambdas are limited compared to normal functions.

If you need more power than a lambda you would use a nested function, e.g. def a(n): def b(): print(n) return b

Nesting functions like this can have a bad performance impact because functions in Python are objects. Normally, all of those function objects are instantiated once when you load the module. However nested functions will be instantiated at runtime every time their parent is called, even if they aren’t used. This cost is perceptible in hot paths.

Re: Go + Services = One Goliath Project

#90

Ok this is going to sound ignorant, as my only experiences in backend services have been Go and Python. I don't like either. Is there something I'm missing? For simple CRUD apps, both are sufficient. But (in my limited experience), the moment I've wanted to create more complex business logic with stricter constraints, neither has been quite up to the task. Go doesn't make things easy. It asks you to repeat yourself.…

> For loops take more reading to understand. A short comment would help here.

They could also improve the language. Map, filter, and reduce are such fundamental concepts.
Post reply on HN