top | item 32314707

(no title)

wheaties | 3 years ago

This is why adding language features needs to be carefully thought out and explored to great lengths. Sadly C++ never got that memo. Here's hoping Python remains "simple."

discuss

order

Waterluvian|3 years ago

I’m not sure I understand the “this is why” part. Python wants to let you override almost everything. It’s a feature and a powerful and occasionally helpful one. It’s also a feature you never ever have to know about or touch.

jesushax|3 years ago

This debate could be summed up as:

There's more than one way to do it *vs* there should be one, and preferably only one, obvious way to do it

jamesfinlayson|3 years ago

Agreed - I mostly use Python for small scripts and it makes that use case very easy. I know it has a bunch more features for more niche stuff as well but my throwaway script to download images from a webpage doesn't need pattern matching.

Blackthorn|3 years ago

It's like python's metaclasses. You rarely need them but sometimes they really are just the best solution to the problem. Those times, you're really glad they're available.

kazinator|3 years ago

> It’s also a feature you never ever have to know about or touch.

The "never have to know or touch" argument applies only to the lone hacker working on a completely new project with no inherited legacy code.

pansa2|3 years ago

It’s quite clear from the design of Python, both of recent features and of fundamentals like `+=`, that its designers never got that memo either.

I’m baffled as to how it retains its reputation of being a simple language.

shepherdjerred|3 years ago

I think it’s a pretty simple language for how powerful it is. But it’s not simple compared to some other languages like Go

defen|3 years ago

Wait, what's the deal with `+=` ?

petters|3 years ago

I like Python, but it really isn’t “simple” (at least not for more than a decade).

pizza|3 years ago

Is it better for Python to be simple than for Python to be simple for simple problems?

pjmlp|3 years ago

All languages got the memo, including C++.

Either you get Scheme, or languages with features.

Even C isnt' as "simple" as people take it to be.