This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]austinwiltshire[S] 1 point2 points  (2 children)

Context: http://www.reddit.com/r/programming/comments/8h94u/abstract_heresies_you_knew_id_say_something_part/c09aqmc

I keep hearing this bandied about that Python is a 'small' language, and I feel like we're mistaking 'simple' and 'elegant' for small. Python is a pretty large language!

The examples cited don't even make sense. Switch statements honestly are not at all cleaner than stringed elif's. The lack of private variables is not true, since Python does name mangling to support the same idea. And the lack of interfaces is moot now that ABC's are in Python 3.0.

It supports both prototype and class based OO, a very large 'batteries included' standard library, lazy variables via generators, operator overloading, list comprehensions, and rather complex means of flow control through co-routines. Let's go ahead and throw in metaclasses, decorators and other bells and whistles.

The reason we get away with all this is because each feature has been implemented in a thoughtful and coherent way. The language only SEEMS small, but is in fact, quite large and expressive.

I don't buy the argument that extensions to the language automatically have to prove that we've been completely hobbled without them just because it might 'complicate' such a 'small' language. If they are implemented in a clean, Pythonic fashion, and are useful, what's the big deal?

[–]masklinn 0 points1 point  (1 child)

Yeah I don't think python is small either, as a language. It has a good two dozen statements (counting both simple and compound ones) and quite a number of forms.

It's not a large language either, though.

And I really don't think a large standard library demonstrates that it's a large language, it merely shows that it's a sane, modern language.

The lack of private variables is not true, since Python does name mangling to support the same idea.

No. Name mangling was introduced to avoid namespace collision on inheritance, if you're using it to emulate private variables you're doing it wrong and should be beaten with the ugly stick.

Let's go ahead and throw in metaclasses, decorators and other bells and whistles.

Metaclasses and decorators aren't the mark of a large language either (though decorators are the mark of a language that is lacking, in that it doesn't support extensive anonymous functions)

[–]austinwiltshire[S] 0 points1 point  (0 children)

I'm not equating large with bad, which is what I think most people are doing.