what has python added to programming languages? (lets be esoteric,shall we ;)

  • Thread starter Wildemar Wildenburger
  • Start date
W

Wildemar Wildenburger

Over the time I've seen lots of remarks about python that read like "a
lot like lists in lisp" or "like the hashtable in java" or any other
form of "like <feature> in <language>".

Are there any concepts that python has not borrowed, concepts that were
not even inspired by other languages? I'm just interested if it is
"merely" a best-of collection of language features or if there are
actually inventions that have not - or hardly - existed in programming
before python?

wildemar
 
M

Michele Simionato

Wildemar said:
Over the time I've seen lots of remarks about python that read like "a
lot like lists in lisp" or "like the hashtable in java" or any other
form of "like <feature> in <language>".

Are there any concepts that python has not borrowed, concepts that were
not even inspired by other languages? I'm just interested if it is
"merely" a best-of collection of language features or if there are
actually inventions that have not - or hardly - existed in programming
before python?

wildemar

1. One of the strenght of Python is that it does not try to be
particularly original, most of
the times it just borrows the good features from other languages
without borrowing the
warts.

2. If you ask in a Lisp newsgroup, they will tell you that they
invented everything that it is
cool now (in any language) over 40 years ago. They are also mostly
right ;)

Michele Simionato
 
C

Carl Banks

Wildemar said:
Are there any concepts that python has not borrowed, concepts that were
not even inspired by other languages? I'm just interested if it is
"merely" a best-of collection of language features or if there are
actually inventions that have not - or hardly - existed in programming
before python?

Nesting by indentation


Carl Banks
 
D

dadapapa

It's true that most features of python are intentionally borrowed from
other languages. If I can think of anything that I believe to be
specific to python, I would say it is the combination of high level
datatypes together with an extremely simple syntax. Actually, this
combination often results in idioms that --- although adapted from
other languages --- are seldom as clear as in python. Examples for this
are one-liners like

x,y = y,x
a,b,c = f(x)
for key in my_dict : do_some_thing_with(my_dict[key])

It might be that Guido adapted such notations from ABC, a language I am
not familiar with, but as far as I know, the syntactic sugar for high
level datatypes is one thing that
distinguishes python from other languages.

- harold -
 
I

Iain King

Wildemar said:
Over the time I've seen lots of remarks about python that read like "a
lot like lists in lisp" or "like the hashtable in java" or any other
form of "like <feature> in <language>".

Are there any concepts that python has not borrowed, concepts that were
not even inspired by other languages? I'm just interested if it is
"merely" a best-of collection of language features or if there are
actually inventions that have not - or hardly - existed in programming
before python?

wildemar

I find slice notation consistent and elegant - did it come form another
language?

Iain
 
F

Fredrik Lundh

Examples for this are one-liners like

x,y = y,x
a,b,c = f(x)
for key in my_dict : do_some_thing_with(my_dict[key])

It might be that Guido adapted such notations from ABC, a language I am
not familiar with

something like:

PUT (x, y) IN y, x
PUT f x y IN y, x
FOR key IN keys my_dict:
DO_SOME_THING_WITH my_dict[key]
</F>
 
A

Alex Martelli

Wildemar Wildenburger said:
Over the time I've seen lots of remarks about python that read like "a
lot like lists in lisp" or "like the hashtable in java" or any other
form of "like <feature> in <language>".

Since Python was released well before Java, saying that a feature in
Python is "like <a feature> in Java" normally doesn't mean that Python
imitated Java there -- it's either separate reinvention, or both of them
imitating another language.


Alex
 
M

Michael Tobis

Although somewhat more elegant, Python slices follow Matlab's slice
notation. In simpler cases they are identical.

mt
 
U

utabintarbo

Why does Python have to "add" anything, if it makes "that which came
before" more easily accessible/usable? Perhaps that is its innovation.
Is that not sufficient?
 
R

Ravi Teja

"like the hashtable in java"

People don't give a reference to a language feature only because it
added/invented it but also because it is a popular one that many are
familiar with.

Java did not invent HashTables. They existed long before and were
available to most languages before Java. Neither is it even a Java
programming language feature (it's a class in it's standard library).

Actually, I can't think off the top of my head, any feature in the Java
language (and I am making no assertions about the implementation of
specific instances) that was truly innovative. But that's OK.
Incremental is good.
 
T

Tim Chase

Actually, I can't think off the top of my head, any
feature in the Java language (and I am making no
assertions about the implementation of specific
instances) that was truly innovative.

Let's see...it has bytecode compliation. Oh...not original.
Okay, howsabout cross-platform neutrality? You mean
there are others?! Okay...how about a humongous class
library? Nah. It's tough to call Java original...

Well, Java does have this great feature called "market-hype"...

-tkc
 
C

Carl Banks

Cameron said:
.
You *do* realize this was present in ABC, among others, right?

Yes. I took the question to mean "what has Python made a commercial
success out of that wasn't popular before", which I guess was taking
quite a bit of liberty with it. But he did give us the out of
"hardly". I think it would be fair to say nesting by indentation
hardly existed before Python.


Carl Banks
 
A

Aahz

Yes. I took the question to mean "what has Python made a commercial
success out of that wasn't popular before", which I guess was taking
quite a bit of liberty with it. But he did give us the out of
"hardly". I think it would be fair to say nesting by indentation
hardly existed before Python.

Yup. I started following up to your post exactly as Cameron did before
I realized the rejoinder you were almost certain to make. So I kept my
mouth shut. ;-)
 
B

Boris Borcic

Wildemar said:
Over the time I've seen lots of remarks about python that read like "a
lot like lists in lisp" or "like the hashtable in java" or any other
form of "like <feature> in <language>".

Are there any concepts that python has not borrowed,

Esoterically speaking, you should better distinguish between historic and
individual time.

"Python's foo is like Java's foo" speaks of the individual's "exoteric" order of
experience with Python and Java, that may reverse "esoteric" historical
chronology (and in fact, does so).
 
B

beliavsky

Michael said:
Although somewhat more elegant, Python slices follow Matlab's slice
notation. In simpler cases they are identical.

mt

I think in Matlab, as in Fortran 90, i:j refers to the elements from i
up to and including j, unlike Python, where j is excluded. Another
language with slicing is S, implemented in S-Plus and R. It follows the
same convention as Fortran.

The languages treat negative subscripts of lists and arrays
differently. In Fortran, since lower bounds of arrays can be negative,
a negative subscript has no special meaning. In S, where arrays start
with element 1, a negative subscript means that the absolute value of
the subscript is excluded, so that if array x has three elements, x[-2]
refers to (x[1],x[3]). In Python, negative indices "wraparound".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top