Python and the need for speed

Rustom Mody rustompmody at gmail.com
Wed Apr 12 09:48:51 EDT 2017


On Wednesday, April 12, 2017 at 7:09:04 PM UTC+5:30, Ben Bacarisse wrote:
> Steve D'Aprano  writes:
> 
> > On Wed, 12 Apr 2017 03:39 am, Paul Rubin wrote:
> >
> >> I still do my everyday stuff in Python and I'd like to get more
> >> conversant with stuff like numpy, but it feels like an old-fashioned
> >> language these days.
> >
> > "Old fashioned"? With await/async just added to the language, and type
> > annotations? And comprehensions and iterators?
> >
> > Admittedly type annotations are mostly of interest to large projects with
> > many developers and a huge code base. But the rest?
> >
> > Comprehensions may have been around for a decade or two in Haskell, but most
> > older languages don't have them. I'm pretty sure Java doesn't. Does
> > Javascript? Comprehensions feel like a fancy new language feature to
> > me.
> 
> They've been in in Haskell for nearly three decades, but they were
> around before that.  Miranda had them, as did Miranda's immediate
> predecessor, KRC.  KRC dates from about 1980, so if you've been using
> that lineage of languages, list comprehensions have been a standard
> feature for 37 years.  I've been using them almost my entire programming
> life.
> 
> It seems odd that ECMAScript (the JavaScript standard) does not have
> them, but then JS seems to hide its function nature under an imperative
> bushel.

Comes from set comprehensions in SETL (I think)
ie about 50 years old
https://en.wikipedia.org/wiki/SETL

Which itself goes back another 50 years to Zermelo-Fraenkel set theory
[Miranda actually used to call list comprehensions as ZF-expressions]


More information about the Python-list mailing list