We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byIsabella Lucas
Modified over 2 years ago
Why I Invented Python EuroPython – June 27, 2005 Guido van Rossum Elemental Security, Inc.
June 27, 2005© 2005 Guido van Rossum 2 About 30 Years Ago... Discovered computers and programming Learned Algol-60, Fortran and Pascal (in that order!) Enjoyed programming more than anything Wanted better tools, and started creating them Started sharing with others Started learning about other languages
June 27, 2005© 2005 Guido van Rossum 3 About 20 Years Ago... Knew C and Unix really well Worked on implementing ABC, a new language Ported it to Mac and PC (DOS) Was really excited by the authors' philosophy Was disappointed by ABC's lack of integration Saw its failure to gain acceptance
June 27, 2005© 2005 Guido van Rossum 4 About 15 Years Ago... Worked on implementing Amoeba, a new OS Found it needed a scripting language "To bridge the gap between shell and C" Wanted ABC's elegance in that scripting language Had some time on my hands Had some ideas on language implementation
June 27, 2005© 2005 Guido van Rossum 5 Python's Birth Xmas 1989 About two weeks of time off with no plans Had it all in my head Fat Mac with Lightspeed C on 20 MB hard drive First code: a parser generator Soon followed: a running program!
June 27, 2005© 2005 Guido van Rossum 6 Some Design Goals Shell-like (interactive prompt as well as script files) Extensible architecture (create new types) One tool amongst many, work well with others Additional functionality implementable separately Avoid Not-Invented-Here syndrome (borrow freely) Doable as a one-person project (cut some corners)
June 27, 2005© 2005 Guido van Rossum 7 Why Object Oriented? One word: extensibility The original design was OO inside and used OO notation for method access, but did not support user-defined classes Method access was generalized to namespaces One unified namespace for everything in a module Each object is a namespace in its own right A module is just another object Name lookup is customized per namespace User-defined classes were added within the first year, but for a long time remained second-class citizens (until new-style classes in Python 2.2)
June 27, 2005© 2005 Guido van Rossum 8 Good Things About ABC Five powerful data types: –list, table, tuple, number, text Orthogonality an important principle No limits: values can be as large as fits in memory Numbers represent mathematical values, not bits Powerful string processing built-in No type declarations; assignment creates variables Simple control structures: IF, SELECT, WHILE, FOR Interactive >>> prompt
June 27, 2005© 2005 Guido van Rossum 9 Not-so-good Things About ABC Monolithic implementation; hard to add new things Hard to interact with file system Reinvented programming terminology Apostrophe (') in identifiers; UPPERCASE keywords List is unordered multi-set (bag); table is sorted Small strings relatively slow Assignment: PUT expression IN variable No error handling (errors return to >>> prompt) Editing environment too closely integrated Appealed most to people with insufficient computer access; hard to establish "early adopter" community in Unix world due to lack of OS integration
June 27, 2005© 2005 Guido van Rossum 10 What I Changed Extensibility an implementation cornerstone Built-in files; other OS functionality in an extension Returned to standard programming terminology Underscore in identifiers; lowercase keywords List has ordering; dictionary is hash table Optimize for small strings (memcpy is very fast) Assignment: variable = expression Added exceptions, try/except, try/finally (Modula 3) Dropped the integrated editing environment Appealed to the Unix world: imitate /bin/sh behavior, # for comments, support #!, access most low-level Unix system calls (but also PC/Mac ports!)
June 27, 2005© 2005 Guido van Rossum 11 What Else I Changed Much of this was motivated by keeping it simple enough to be a one-person project! Dropped type inference; dynamic typing instead Dropped "refinement" control structures Separated int, long and float numeric types Biggest mistakes: –32-bit integers (premature optimization) –int/int truncating the value (mindlessly copied C) –class/type dichotomy (user-classes an afterthought) –string exceptions (exceptions came before classes!)
June 27, 2005© 2005 Guido van Rossum 12 The Zen of Python 1.Beautiful is better than ugly. 2.Explicit is better than implicit. 3.Simple is better than complex. 4.Complex is better than complicated. 5.Flat is better than nested. 6.Sparse is better than dense. 7.Readability counts. 8.Special cases aren't special enough to break the rules. 9.Although practicality beats purity. 10.Errors should never pass silently. 11.Unless explicitly silenced. 12.In the face of ambiguity, refuse the temptation to guess. 13.There should be one and preferably only one obvious way to do it. 14.Although that way may not be obvious at first unless you're Dutch. 15.Now is better than never. 16.Although never is often better than right now. 17.If the implementation is hard to explain, it's a bad idea. 18.If the implementation is easy to explain, it may be a good idea. 19.Namespaces are one honking great idea let's do more of those! (a poem by Tim Peters)
June 27, 2005© 2005 Guido van Rossum 13 Question Time
® ® Why Design Another Language? Python UK & ACCU Spring Conference Oxford - April 2, 2003 Guido van Rossum Director of PythonLabs at Zope Corporation.
State of the Python Union PyCon DC, March 26-28, 2003 Guido van Rossum Director of PythonLabs at Zope Corporation
"The State of the Python Union" Python10 - Alexandria, VA - February 7, 2002 Guido van Rossum Director, PythonLabs at Zope Corporation
1 Chapter 3 - Language Design Principles. Thought question What characteristics should be present in your “perfect language”? What have you liked/disliked.
Tutorial on Python Programming Chetan Giridhar January 19, 2014.
What's New in Python? "Not your usual list of new features" Stanford CSL Colloquium, October 29, 2003; BayPiggies, November 13, 2003 Guido van Rossum Elemental.
Python at Elemental Security EuroPython - June 29, 2005 Guido van Rossum Elemental Security, Inc.
Reston/San Diego, July 25, O'Reilly Open Source Convention 2001 San Diego, CA Python Track Keynote Guido van Rossum Zope Corporation
Copyright © 2009 Elsevier Chapter 3:: Names, Scopes, and Bindings Programming Language Pragmatics Michael L. Scott.
Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point.
Introduction to. What is Python? Dynamic, interpreted high-level language. Created in 1991 by Guido van Rossum. Design philosophy: Short development time.
9.1 9 Programmin g Languages Foundations of Computer Science Cengage Learning.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 23: XML.
10/10/1999© 1999 CNRI, Guido van Rossum 1 Python Workshop Guido van Rossum CNRI (Corporation for National Research Initiatives, Reston, Virginia,
MT311 (Oct 2007) Java Application Development Concepts of Programming Languages, Language Evaluation Tutorial 5.
Telecooperation/RBG Technische Universität Darmstadt Copyrighted material; for TUD student use only Introduction to Computer Science I Topic 16: Static.
Names, Scope, Memory, and Binding. Name, Scope, and Binding A name is exactly what you think it is – Usually think of identifiers but can be more general.
COMPILER CONSTRUCTION WEEK- 4: INTRODUCTION TO COMPILER & INTERPRETER.
1 Object Systems Methods for attaching data to objects, and connecting behaviors Doug Church.
Objects and Classes Part II CIS 61. Constructors We saw before two ways that member functions can be used to give values to the data items in an object.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
A Third Look At ML 1. Outline More pattern matching Function values and anonymous functions Higher-order functions and currying Predefined higher-order.
Chapter 2: Operating-System Structures. 2.2 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
CSE-105 – Structured Programming CSE, BUET Introduction CSE 105 Structured Programming Language (C)
ASWEC 2008Slide 1 Construction by Configuration: An opportunity for SE research Prof. Ian Sommerville St Andrews University Scotland.
Programming For Nuclear Engineers Lecture 10 MATLAB 1.
An Introduction to C++ Dave Klein Research Analyst Credit Derivatives Research LLC.
PHP I. PHP, or PHP Hypertext Preprocessor is a server-side scripting language. Originally created in 1994 by Rasmus Lerdorf, to track users at his web.
Where do objects come from? A brief history of object-oriented thought.
© 2017 SlidePlayer.com Inc. All rights reserved.