Forgot your password?
typodupeerror
Python

Interviews: Q&A With Guido van Rossum 242

Posted by samzenpus
from the ask-away dept.
Guido van Rossum is best known as the creator of Python, and he remains the BDFL (Benevolent Dictator For Life) in the community. The recipient of many awards for his work, and author of numerous books, he left Google in December and started working for Dropbox early this year. A lot has happened in the 12 years since we talked to Guido and he's agreed to answer your questions. As usual, ask as many as you'd like, but please, one question per post.
This discussion has been archived. No new comments can be posted.

Interviews: Q&A With Guido van Rossum

Comments Filter:
  • by nurhussein (864532) on Monday August 19, 2013 @11:49AM (#44608017) Homepage
    Hi,

    What prompted the move from Google to Dropbox? What did you do at Google, and what are you going to do at Dropbox?
  • GIL (Score:5, Interesting)

    by Anonymous Coward on Monday August 19, 2013 @11:56AM (#44608065)

    When will you remove the GIL?

  • Who's watching (Score:5, Interesting)

    by Anonymous Coward on Monday August 19, 2013 @11:59AM (#44608087)

    Does the NSA have access to our Dropbox contents, as is apparently the case with Microsoft Skydrive?

    • did you look at the prism slides? guess whos logo is up there with ms, google, skype, and yahoo? dropbox. they have to listen to nation security letters and blanket fisa court orders just like everyone else.

    • NSA has access to any contents that is hosted on the servers that are located on the US soil.

  • by PktLoss (647983) on Monday August 19, 2013 @12:04PM (#44608133) Homepage Journal

    Do you regret the swath of backwards incompatible changes in version 3 that have lead to such slow uptake, or do you feel it was the best move for the language moving forward?

    • by HaZardman27 (1521119) on Monday August 19, 2013 @12:21PM (#44608311)
      I would be very interested in seeing the answer to this. As a Python programmer I've nearly entirely avoided using Python 3.x in favor of 2.7. I just see fewer advantages to it than disadvantages (having to update old code, learning which libraries I use support 3.x, etc.). The Python community seems divided between 2.7 and 3, and this is problematic for a language designed to be clean with a "correct" and "pythonic" way of doing things.
      • You know it is entirely possible to write 2.7 code that works with nothing more than a pass through 2to3. That does mean that any libraries you depend on are available for 3.x but the problem of lacking support from 3rd party libraries is beginning to diminish as more are ported over at an increasing rate.

        You can also start training yourself for the switch to Python 3 now by using all of the from __future__ imports which will also increase the ease of getting 2to3 output working when any missing support is

        • by xiox (66483)

          You know it is entirely possible to write 2.7 code that works with nothing more than a pass through 2to3. That does mean that any libraries you depend on are available for 3.x but the problem of lacking support from 3rd party libraries is beginning to diminish as more are ported over at an increasing rate.

          It's also possible to write code for 2.6/2.7 which works fine with 3.3+. With the aid of the six module or similar ideas you can work around the differences. Many people think this is the best way to have joint compatibility with python 2 and 3. It also makes it possible to do the development with python3, which running 2to3 doesn't allow. As others have mentioned, there is no good 3to2.

  • Interviews (Score:5, Interesting)

    by semanticgap (468158) on Monday August 19, 2013 @12:04PM (#44608137)

    Guido

    When you interviewed at Google - did they ask you brainteaser or hard algorithmic questions, and if so, what did you think of it?

    Cheers!

  • by i_ate_god (899684) on Monday August 19, 2013 @12:17PM (#44608247) Homepage

    Interfaces, abstract classes, private members, etc... Why did python avoid all this?

    • Ultimately, since Python is dynamic down to being able to override the data model of an object on the fly, there would be no point. There is no point in any program really. Underscores do just as good of job as public/private declarations at telling me which parts of the API are for users and which are for the class. I might use private attributes and methods, but I ought to know what I'm doing if I do. Any program's data can be made public, and the more frequently the need arises, the better programmer
    • by Rob Riggs (6418)

      Interfaces, abstract classes, private members, etc... Why did python avoid all this?

      I'm curious -- how many dynamically-typed languages have these features?

    • Python does have abstract classes [python.org]. They have also been backported to 2.6 for those that want to use them before transitioning to 3.x. See the numbers module [python.org] for an example of their use.

  • Multi-line lambdas (Score:3, Interesting)

    by NeverWorker1 (1686452) on Monday August 19, 2013 @12:21PM (#44608309)
    One of the most common complaints about Python is the limitations of its lambdas, namely being one line only without the ability to do assignments. Obviously, Python's whitespace treatment is a major part of that (and, IIRC, I've read comments from you to that effect). I've spent quite a bit of time thinking about possible syntax for a multi-line lambda, and the best I've come up with is trying to shoehorn some unused (or little used) symbol into a C-style curly brace, but that's messy at best. Is there a better way, and do you see this functionality ever being added?
    • Re: (Score:3, Funny)

      by blamelager (1152861)
      >>> from __future__ import braces
      • Exactly. It's terribly unpythonic. Sadly though, I don't have a better way to do multi-line lambdas.
    • Keep in mind that Python uses a stack machine VM and that this makes function call overhead large, as each call requires a new stack frame to be set up. A strong lambda will lead to creep. Then again, why don't we have a register based VM?
    • by DriedClexler (814907) on Monday August 19, 2013 @01:42PM (#44609241)

      Solution:

      1) Make it a named function.
      2) Place the name where you'd otherwise put the lambda.

      It works, although you have to deal with the horror of a reusable function defined a few lines up.

      • by Laxori666 (748529)
        This doesn't work if the lambda is embedded inside of an expression. I have found a reasonable (read: hacky and nobody should do it) solution: have the lambda return a tuple. Each element in the tuple is an expression and will get executed in order. The only problem is you can't do variable assignment, but everything that's an expression works...
    • Eh, I can give or take the lambdas. Just give me a halfway decent switch-case statement so I don't have to write huge, rolling if-elif-elif-elif-elif-elif-else-finally blobs. Using built in language reflection to parse a parameter into a function name you call later isn't an answer and has led to many, many python scripts crapping out on me when you actually want to use string data containing '-' or other strange, exotic ASCII characters in them as your key into the switch statement.
    • Lambdas can only contain one expression, but that expression can have side effects. For example, we can wrap statements up into functions (which they should be anyway), we can call these functions from inside a tuple (the elements in a tuple are guaranteed to be evaluated in order) and we can get mutable local state by pushing and popping the elements of a list.

      I wrote a rather rambly blog post about doing this http://chriswarbo.net/index.php?page=news&type=view&id=admin-s-blog%2Fanonymous-closures- [chriswarbo.net]

  • Hate to throw a curveball here, but answer honestly: why is Python such an awesome language?
  • by Laxori666 (748529) on Monday August 19, 2013 @12:24PM (#44608353) Homepage
    Compound question here: what part of Python is or became your favorite, and what's the worst thing, something that you would change if you knew now what you did then?
  • One thing different (Score:5, Interesting)

    by NeverWorker1 (1686452) on Monday August 19, 2013 @12:25PM (#44608367)
    If you could go back to the very start and change one thing about Python, what would it be and why?
    • Gotta be the half-assed initial support for OO. Either that or the print statement :P

      • by TeknoHog (164938)

        Gotta be the half-assed initial support for OO. Either that or the print statement :P

        Python 3.1.5 (default, Apr 12 2013, 15:09:42)
        [GCC 4.7.2] on linux2
        Type "help", "copyright", "credits" or "license" for more information.
        >>> print("What's a print statement?")
        What's a print statement?
        >>> print "Beats me."
        File "<stdin>", line 1
        print "Beats me."
        ^
        SyntaxError: invalid syntax
        >>>

  • PyPy (Score:5, Interesting)

    by Btrot69 (1479283) on Monday August 19, 2013 @12:28PM (#44608389)

    Do you see PyPy as the future ? http://pypy.org/ [pypy.org]
    Or do you remain unconvinced, and -- if so -- why ?

  • Do you take on interns or devs that want to learn by doing while sitting in the same room w/you?
  • by Btrot69 (1479283) on Monday August 19, 2013 @12:36PM (#44608477)

    Over the years, there have been several attempts to create a sandboxed version of python that will safely run in a web browser.
    Mostly this was because of problems with Javascript.
    Now that Javascript works -- and we have nice things like CoffeeScript -- is it time to give up on python in the browser ?

  • Another BDFL (Score:4, Interesting)

    by Anonymous Coward on Monday August 19, 2013 @12:37PM (#44608497)

    What is your view on the tone that Linus uses on the LKML? Do you think it actually provides any benefits or just drives away would-be contributors?

  • by neonleonb (723406) on Monday August 19, 2013 @12:42PM (#44608537) Homepage

    The main thing that keeps Python from being really useful for my projects is the Global Interpreter Lock (GIL). I would love to write Python for my data-intensive code, but it is impossible to get really good parallelism with Python; the multiprocessing library isn't a magic fix because then I have to move all my data back and forth between processes.

    When, if ever, should I expect to be able to use Python to do parallel data processing? What is the priority for this, and what would need to be done to make thread-level parallelism possible?

  • Python 3 Regrets (Score:4, Insightful)

    by n1ywb (555767) on Monday August 19, 2013 @12:47PM (#44608589) Homepage Journal
    If you could go back in time, what, if anything, would you do differently WRT to developing and releasing Python 3?
  • Do you wish you'd named your language after a different type of snake?

    P.S. Yes I know it's from "Monty Python". If it'd been my language I would have called it Groucho.

  • by dkleinsc (563838) on Monday August 19, 2013 @12:54PM (#44608663) Homepage

    Have the prospects of Python in any way improved since you grew a beard [c2.com]? To what degree does language success correlate to beard length?

  • Are you aware of any attempts by the NSA to add a backdoor in Python ?
    Of course, if you did get an NSA letter, you wouldn''t be allowed to say.
    You are welcome to NOT ANSWER this question.
    We will take note of that ;)

  • by ebno-10db (1459097) on Monday August 19, 2013 @01:05PM (#44608785)

    Some people claim that Python is, at least partly, a functional language. You disagree, as do I. Simply having a few map and filter type functions does not make for a functional language. As I understand it those functions were added to the libraries by a homesick Lisper, and that several times you've been tempted to eliminate them. In general it seems you're not a fan of functional programming, at least for Python.

    Question: do you feel that the functional programming approach is not very useful in general, or simply that it's not appropriate for Python? It would be nice to hear your reasons either way.

    • Just wanted to say that if Python lacked the functional stuff, I wouldn't it like it nearly as much.

  • NSL (Score:2, Offtopic)

    What *does* a National Security Letter look like?
  • by js_sebastian (946118) on Monday August 19, 2013 @01:24PM (#44608999)
    What are the big features/improvements of python 3 that could/should convince me to make the effort to switch over from python 2.x to python 3.x?

    I am not able to do the switch now as I rely on some libraries that have not finished converting to python 3 yet, but having something to look forward to other than the pain of backwards-incompatibility could go a long way in getting me to prepare for the change instead of ignoring the issue.
    • I feel that the reasons are evident in the release notes that describe the new features in 3.1, 3.2, 3.3...
      The more interesting question to me is what he thinks of the serious lag in library support for Py3, which I posted below.

      • I feel that the reasons are evident in the release notes that describe the new features in 3.1, 3.2, 3.3... The more interesting question to me is what he thinks of the serious lag in library support for Py3, which I posted below.

        Care to point out some highlights? A little bit of evangelism would not hurt. If you ask Stroustroup what are the cool new features of C++11, he has a good answer ready. Other than the new unicode support, which is very important in some contexts but not everywhere, I see nothing else that's very exciting looking here: http://docs.python.org/3.0/whatsnew/3.0.html [python.org].

  • A major reason I recently started to use Python is that there's so much already out there, for free, in terms of packages and support. Was this widespread adoption an original goal, a positive after-effect or logical outcome?
  • by js_sebastian (946118) on Monday August 19, 2013 @01:56PM (#44609399)
    Tools like ipython and fabric go a long way into making python into something that can replace my bash shell in many situations.

    The main obstacle to this use-case is python's semantic spacing and lack of braces (or something):

    - it is hard to do even a fairly simple if/else or loop in a single line so it will interact nicely with the terminal's history
    - it is hard to cut&paste code into the terminal because you have to be wary of leading spaces

    Ipython tries to solve some of this with shortcuts to bring up a built-in editor, which is an approach that works but is quite cumbersome.

    Do you think convenient usage on the interactive shell is a worthy goal that the language should support? if so, is there any direction the language or libraries could develop to better support it?
  • Have you ever thought about merging some of the ideas of the Stackless python interpreter into some future version of python to make the whole argument mute?
    I've played with stackless and depending on what you're doing it can leverage huge benefits.
  • by Anonymous Coward

    Guido, if you were to design Python from scratch now (without any constraint and legacy code using the old Python), what would you change and how different would it be from Python 3?

  • by Btrot69 (1479283) on Monday August 19, 2013 @02:41PM (#44609845)

    How often do you get a chance to write serious code ?
    What's your default OS ?
    Command shell ?
    Version control ?
    Editor ?
    IDE ?
    Web browser ?
    IM client ?
    email client ?

    late nights or early rise ?

  • Python 3 (Score:4, Interesting)

    by MetalliQaZ (539913) on Monday August 19, 2013 @03:10PM (#44610195)

    How do you feel about the current state of the migration to Python 3 (Py3k)?
    From a user perspective it seems that the conversion of popular libraries has lagged far behind, which has impeded the transition. In my professional capacity, nearly every single system I use lacks an installed 3.x interpreter. In fact, 2.7 is a rarity. I'd like to get your thoughts.

    • I'm also curious about this. Most production environments and many external libraries are firmly entrenched in Python 2.x. Were the changes in Python 3 too much, too late? In other words, was the house to near completion to start ripping up the floorboards and tearing out the drywall again?
  • I'd like to get your thoughts on Python as it compares to some of the newer developments in programming languages. In the past few years, the hyperactive growth of the web in the mobile space and in so-called "cloud computing" have spurred all kinds of new languages from new upstarts and companies like Google (go, dart); as well as new features in established languages like C#, Java, C++. How do you think the cutting edge of Python will compare to people who might be lured away by those new toys? Or, in

  • Perl 6 is an ambitious new programming language in the Perl family.
    Have you read the Perl 6 specifications [perlcabal.org]?
    What do you think of the Perl 6, the language (syntax changes) and its new features (meta-operators, advanced OOP, built-in paralelism, signatures as first class objects, grammars)?

  • Emergent OOism -- that everything is an object, including the variable types -- can provide continual surprises of what is possible, even to veteran programmers in other languages. As you were developing and using Python, Guido, what was your favorite surprise? What was now easily possible using Python that would have been very difficult with another language (at the time, or even nowadays)?

    Mine: a dictionary of lambda functions for parsing text, and writing a custom MapReduce capability for AWS in 372 lin

  • Hello,

    The Git distributed version control system is today the most used for the OSS projects. This was not the case back to the day when the Python project selected Mercurial to store hi source code. After all, at this time the mass of users of a specific SCM was not a important parameter for the decision since a bunch of a new generation of SCM was relatively new. Now, several years later, the Git audience is several order of magnitude bigger than the Mercurial audience. It has also proved to be appropriat

  • Though I've since grown accustomed to it, when PEP 308 was first resolved the grammar of the conditional expression ("X if C else Y"), placing the conditional as it does in between the choices, struck me (and not me alone) as particularly odd. Does this reflect your mischievous sense of humour, or am I missing something because I'm not Dutch?

Parts that positively cannot be assembled in improper order will be.

Working...