I'm a computer science student, and have recently been trying to
convince the professor who teaches the programming language design
course to consider mentioning scripting languages in the future. Along
those lines, I've been trying to think of features of Python, and
scripting languages in general, that can't be found in older languages,
and have been having a surprising amount of trouble. Dynamic typing
can be found in Smalltalk, the module concept can be found in Ada,
functional parameters and the dynamic creation of functions can be
found in Lisp. The indentation-based syntax seems to be unique, but
that's not really what I'm looking for. So I'm wondering, what is
innovative about Python, either in its design or implementation? Or is
its magic really just in combining many useful features of prior
languages in an unusually pleasant way?
Greg 19 4251
gsteff wrote: I'm a computer science student, and have recently been trying to convince the professor who teaches the programming language design course to consider mentioning scripting languages in the future. Along those lines, I've been trying to think of features of Python, and scripting languages in general, that can't be found in older languages, and have been having a surprising amount of trouble. Dynamic typing can be found in Smalltalk, the module concept can be found in Ada, functional parameters and the dynamic creation of functions can be found in Lisp. The indentation-based syntax seems to be unique, but that's not really what I'm looking for. So I'm wondering, what is innovative about Python, either in its design or implementation? Or is its magic really just in combining many useful features of prior languages in an unusually pleasant way?
IMO it is the latter. Most of the features of Python can be found in other languages. Not
so many languages have them all. It is the combination of ease of use and power that makes
Python stand out.
Kent
Perhaps you should ask yourself why you like Python first, and then
you'll probably have an answer.
I'd say that Python is all about productivity.
You can get more done in less time and with fewer lines of code because
it's more consice, flexible and expressive.
It's also very clear, easy to write and easy to read.
You don't need to compile before running your code, and its
interactivity lets you experiment and try different approaches faster
and better when writing algorithms. This leads to better results and
much faster than with any other traditional language.
Luis
>> The indentation-based syntax seems to be unique
I think Haskell was there first. As well as ABC, one of Python's
precursors.
Python is a pragmatic language, just like C (I wish I could say that
about Java). It does not necessarily innovate but incorporates things
known to work elsewhere. C and Java have not done anything particularly
unique either. They are included in curricula by their popularity.
Isn't that a good enough argument?
Indeed. I've found that I can code applications with 10-20% of the
amount of code required by other languages and write the code in a
correspondingly shorter period of time. The result is far less brittle,
more functional and far more maintainable. This is code you can come
back to a year later and pick right up with ease. That's not something
I can say for most traditional compiled languages. All of this, of
course, translates directly to much lower lifecycle cost and safer,
more reliable code.
--Jon
gsteff <gr*************@gmail.com> wrote: The indentation-based syntax seems to be unique
No, you can find it in Haskell too (independently developed), and older
languages such as Occam.
Alex
gsteff wrote: So I'm wondering, what is innovative about Python, either in its design or implementation? Or is its magic really just in combining many useful features of prior languages in an unusually pleasant way?
Greg
The latter. http://www.python-in-business.org/ep...?document=8599
As Guido described in his presentation Python is a decendent of ABC
developed at the university where he studied.
Here is some material about the primary motivations of ABC: http://homepages.cwi.nl/~steven/abc/language.html
Python seems to proof that eclecticism can be done right.
Kay
On Mon, 19 Dec 2005 09:55:44 -0800, gsteff wrote: I'm a computer science student, and have recently been trying to convince the professor who teaches the programming language design course to consider mentioning scripting languages in the future. Along those lines, I've been trying to think of features of Python, and scripting languages in general, that can't be found in older languages, and have been having a surprising amount of trouble. Dynamic typing can be found in Smalltalk, the module concept can be found in Ada, functional parameters and the dynamic creation of functions can be found in Lisp. The indentation-based syntax seems to be unique, but that's not really what I'm looking for. So I'm wondering, what is innovative about Python, either in its design or implementation? Or is its magic really just in combining many useful features of prior languages in an unusually pleasant way?
Greg
I can suggest to read the introduction of the (free)book :
* Green Tea Press - How to Think Like a Computer Scientist- Learning With
Python 2002
--
David Van Mosselbeen da**********************@telenet.be
Kay Schluehr wrote: gsteff wrote:
So I'm wondering, what is innovative about Python, either in its design or implementation? Or is its magic really just in combining many useful features of prior languages in an unusually pleasant way?
Greg
The latter.
http://www.python-in-business.org/ep...?document=8599
As Guido described in his presentation Python is a decendent of ABC developed at the university where he studied.
Here is some material about the primary motivations of ABC:
http://homepages.cwi.nl/~steven/abc/language.html
Python seems to proof that eclecticism can be done right.
Python has as much resemblance to ABC as an airplane does to a car.
The design principles used by ABC (like colons at the end of lines)
may have a certain justification in the context of ABC, but you cannot
simply transfer that justification to python.
ABC is designed specifically and entirely to be beginner-friendly.
Python is not.
gsteff wrote: I'm a computer science student, and have recently been trying to convince the professor who teaches the programming language design course to consider mentioning scripting languages in the future. Along those lines, I've been trying to think of features of Python, and scripting languages in general, that can't be found in older languages, and have been having a surprising amount of trouble. Dynamic typing can be found in Smalltalk, the module concept can be found in Ada, functional parameters and the dynamic creation of functions can be found in Lisp. The indentation-based syntax seems to be unique, but that's not really what I'm looking for. So I'm wondering, what is innovative about Python, either in its design or implementation? Or is its magic really just in combining many useful features of prior languages in an unusually pleasant way?
Greg
I find that development in python is much faster than anything else. But
one of the noticeable features, for me and presumably computer science
students, is the pseudocode-python translation: I've been working
through a CS textbook to train for the IOI, and noticed how much my
python implementations look like the textbook's pseudocode (whereas the
C++ versions look nothing like the pcode).
If anything, python is _more_ expressive - where list comprehensions and
generators are the natural way of doing things, the textbook has to
kludge because its target audience is C++, Java and Pascal programmers.
--Max
> [w]hat is innovative about Python, either in its design or implementation?
This is probably the wrong approach to take.
What Python brings to the table isn't a new capability, but an elegant
and straightforward notation. It's not as beautiful as LISP, but it's
close. Sell it on that, not on any unique or rare capabilities.
I like python.. Its ok.. One thing that I find a bit dangerous it the
use
of the tab character for indentation.. I've had copy and pasts loose
indentation on me and its theoretically impossible to really figure out
what the indentation should be. I think for the extra effort it would
have
taken to put brackets in the language it would increase a lot of
peoples
confidence in using it for codeing...
gsteff <gr*************@gmail.com> wrote:
... that's not really what I'm looking for. So I'm wondering, what is innovative about Python,
The letter 'y'. Before Python, it was woefully underused in the names
of programming languages. Now, of course, there's also Ruby, but then
we know Ruby did get some ideas from Python (and the letter 'y' is one
of them).
Alex
In article <1h***************************@mail.comcast.net> , al***@mail.comcast.net (Alex Martelli) wrote: gsteff <gr*************@gmail.com> wrote: ... that's not really what I'm looking for. So I'm wondering, what is innovative about Python,
The letter 'y'. Before Python, it was woefully underused in the names of programming languages. Now, of course, there's also Ruby, but then we know Ruby did get some ideas from Python (and the letter 'y' is one of them).
Alex
Yacc has been around for a long time.
Roy Smith <ro*@panix.com> wrote: In article <1h***************************@mail.comcast.net> , al***@mail.comcast.net (Alex Martelli) wrote:
gsteff <gr*************@gmail.com> wrote: ... that's not really what I'm looking for. So I'm wondering, what is innovative about Python,
The letter 'y'. Before Python, it was woefully underused in the names of programming languages. Now, of course, there's also Ruby, but then we know Ruby did get some ideas from Python (and the letter 'y' is one of them).
Yacc has been around for a long time.
....but is not a programming language...
Alex > that's not really what I'm looking for. So I'm wondering, what is > innovative about Python,
The letter 'y'. Before Python, it was woefully underused in the names of programming languages...
Roy> Yacc has been around for a long time.
Sure, but it's capitalized there. Python innovated the use of lower-case
'y'.
Skip
"KraftDiner" <bo*******@yahoo.com> writes: I like python.. Its ok.. One thing that I find a bit dangerous it the use of the tab character for indentation.. I've had copy and pasts loose indentation on me and its theoretically impossible to really figure out what the indentation should be.
So don't use tabs. Use spaces.
I think for the extra effort it would have taken to put brackets in the language it would increase a lot of peoples confidence in using it for codeing...
It would decrease mine. It would mean I can't just look at the code to
check control flow, I actually have to check the blasted brackets.
<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
i don't know if they are unique, but my favourite features are:
readable and short code (consistent syntax, few keywords)
iterpreter (very useful for learning)
dir(obj) / vars(obj) (very useful for learning)
identation
dynamic typing
lightweight oo (no public/protected/private)
built-in types (list, dict, str have useful methods)
iterator protocol
generators (yield syntax)
list comprehension / generator expression
keyword args
slicing
tuple assignment (unpacking tuple: a,b =1,2)
return with multiple values (tuple makes it easy)
widespread (it's easy to find a python module for any kind of task)
extendible with low-level languages (pyrex/swig/boostpython)
crossplatform
free
nszabolcs
"Szabolcs Nagy" <ns*******@gmail.com> wrote: iterpreter (very useful for learning)
In my mind, this is the coolest feature of all. Most of the time, I don't
even bother looking stuff up in the docs; it's faster to just fire up an
interpreter and try something. Functions like:
dir(obj) / vars(obj) (very useful for learning)
really work well with this (I'm trying to figure out some way to work
"synergize" into this without sounding like some corporate marketing wonk).
identation
Feh. A red herring. At best, syntactic sugar. At worst, something for
potential adopters to get hung up about.
dynamic typing
Another absolute key feature, which can't be fully appreciated until you're
staring at some 20-line long C++ template error message that you can't even
begin to figure out.
lightweight oo (no public/protected/private)
This one is debatable. This is value in private data (and methods).
Fortunately, Python does let you make things private with the
double-underscore syntax.
built-in types (list, dict, str have useful methods)
Python does come with a good assortment of built-in types and containers,
but most languages these days come with pretty much the same assortment.
iterator protocol
More than the protocol is the syntax. Every iterator in Python looks and
feels the same. No flipping through pages of documentation to figure out
how this particular class's iterator works.
generators (yield syntax) list comprehension / generator expression keyword args slicing tuple assignment (unpacking tuple: a,b =1,2) return with multiple values (tuple makes it easy) widespread (it's easy to find a python module for any kind of task) extendible with low-level languages (pyrex/swig/boostpython) crossplatform free
nszabolcs identation
Feh. A red herring. At best, syntactic sugar. At worst, something for potential adopters to get hung up about.
i always ident my code, but in python i don't need to bother with the
{} and the ; (which is redundant if i ident anyway) so i like it
because i need to type less, and i can read other's code (because of
the same layout). lightweight oo (no public/protected/private)
This one is debatable. This is value in private data (and methods). Fortunately, Python does let you make things private with the double-underscore syntax.
i like it because i need to type (and think) less. When i need to make
it clear, which method is private/protected, i can always add a '_' or
'__' prefix by convention. built-in types (list, dict, str have useful methods)
Python does come with a good assortment of built-in types and containers, but most languages these days come with pretty much the same assortment.
python has very few built-in types and these are powerful. C++ stl or
java.util has more data structures but those are somewhat less usable.
Other languages with the same bult-in data types (thinking about perl,
php, ruby) always have a little bit differrent behaviour and i always
happen to prefer the python way. (nothing can beat python's list +
slicing or the ease of creating a dict). This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Hoang |
last post by:
Does anyone know of an existing algorithm/module for generating a unique ID
for a given CD or DVD? This would be something akin to CDDB where a CD is
recognized based on its content. I could be...
|
by: Joe Wong |
last post by:
Hi,
I need to implement a unique number generator that 1 or more processes on same or different machines will make use of it. Is there any library / project available already for this?
Thanks...
|
by: Jonathan Fine |
last post by:
Giudo has suggested adding optional static typing to Python.
(I hope suggested is the correct word.)
http://www.artima.com/weblogs/viewpost.jsp?thread=85551
An example of the syntax he proposes...
|
by: Russell E. Owen |
last post by:
I have several situations in my code where I want a unique identifier
for a method of some object (I think this is called a bound method). I
want this id to be both unique to that method and also...
|
by: EP |
last post by:
This inquiry may either turn out to be about the suitability of the
SHA-1 (160 bit digest) for file identification, the sha function in
Python ... or about some error in my script. Any insight...
|
by: emrahayanoglu |
last post by:
Hello Everyone,
Now, I'm working on a new web framework. I tried many test on the other
programming languages. Then i decided to use python on my web framework
project.
Now i want to listen...
|
by: Greg Corradini |
last post by:
Hello All,
I'm attempting to create multiple dictionaries at once, each with unique
variable names. The number of dictionaries i need to create depends on the
length of a list, which was returned...
|
by: Steven D'Aprano |
last post by:
I have an application that will be producing many instances, using them
for a while, then tossing them away, and I want each one to have a unique
identifier that won't be re-used for the lifetime...
|
by: breal |
last post by:
I have three lists... for instance
a = ;
b = ;
c = ;
I want to take those and end up with all of the combinations they
create like the following lists
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |