[Tutor] Pythonic way

Alan Gauld alan.gauld at yahoo.co.uk
Tue Nov 20 15:22:01 EST 2018


On 20/11/2018 18:08, Avi Gross wrote:
> ... So there isn’t really ONE pythonic way for many things. 

That's true and, I think, inevitable for anything developed
in the open source world. If you compare it to a language
entirely controlled by a single mind - like Oberon or Eiffel
say - then there is much less consistency. But how many people
actually use Oberon or Eiffel in the real world these days?

> We have two completely separate ways to format strings

And many options for concurrency and for running external
programs. Much of it is history and the need for backward
compatibility.

And let's not even think about web and GUI frameworks!

> ..you can do much without creating objects or using functional programming
> ...If you come from an OO background, you can have fun making endless classes
>...If you lie functional programming with factories that churn out functions
> ...There are other such paradigms supported including lots of miniature sub-languages

> ...effectively means being open to multiple ways 

I think that's a very deliberate feature of Python going back
to its original purpose of being a teaching language that
can be used beyond the classroom. It was always intended
to support multi paradigms. After all, every programmer
should be aware of multiple paradigms and when to best
use each.

BUt, Python is currently suffering the same fate as C++ in
that, as it becomes more mainstream in real-world industry,
the feature demands upon it inevitably move it away from some
of those original teaching based ideas. It is certainly
a much harder language to learn today than it was when
I started in 1998. From a pure academic CS view many changes
are good (eg. iterators and meta programming) but from a
non-academic beginner(or even high school student) they are
just plain confusing. It's all part of being a success in
the real world. The funding for development comes from the
industrial user community not the high schools or colleges,
so their needs come first.

PS. Just back from vacation so still catching up on the
last week's discussions!

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list