Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Python Programming

Guido van Rossum Explains How Python Makes Thinking in Code Easier (dropbox.com) 297

Dropbox's Work in Progress blog shared a 2000-word "conversation with the creator of the world's most popular programming language," noting that many computer science schools are switching over from Java to Python, and arguing that "JavaScript still owns the web, and Java runs 2.5 billion Android phones, but for general purpose programming and education, Python has become the default standard."

They also write that the language's recently-retired creator Guido van Rossum "thinks Python may be closer to our visual understanding of the structures that we are representing in code than other languages." "While I was researching my book, CODERS," says author Clive Thompson, "I talked to a lot of developers who absolutely love Python. Nearly all said something like 'Python is beautiful.' They loved its readability -- they found that it was far easier to glance at Python code and see its intent. Shorn of curly brackets, indented in elegant visual shelves, anything written in Python really looks like modern poetry." They also find that Python is fun to write, which is more important than it may seem. As Thompson writes, "When you meet a coder, you're meeting someone whose core daily experience is of unending failure and grinding frustration."

Building the priority of the programmer's time into the language has had a curious effect on the community that's grown around it. There's a social philosophy that flows out of Python in terms of the programmer's responsibility to write programs for other people. There's an implicit suggestion, very much supported by Van Rossum in the ways he talks and writes about Python, to take a little more time in order to make your code more interpretable to someone else in the future. Expressing your respect for others and their time through the quality of your work is an ethos that Van Rossum has stealthily propagated in the world. "You primarily write your code to communicate with other coders, and, to a lesser extent, to impose your will on the computer," he says...

Part of the enduring appeal of Python is the optimism and humility of starting over. "If you've invested much more time into writing and debugging code, you're much less eager to throw it all away and start over." Co-founder and CEO, Drew Houston wrote the first prototype of Dropbox in Python on a five-hour bus ride from Boston to New York. "The early prototypes of Dropbox were thrown away, largely, many times," says Van Rossum....

What has he taken away from his thirty year journey with Python? "I have learned that you can't do it alone, which is not an easy lesson for me. I've learned that you don't always get the outcome that you went for, but maybe the outcome you get is just as good, or better."

Though two decades ago van Rossum had tried a short-lived project called Computer Programming 4 Everybody (or CP4E), he now says "I'm not so sure that it needs to happen anymore. I think computers have made it to that point, where they're just a useful thing that not everybody needs to know what goes on inside."

Long-time Slashdot reader theodp also flagged van Rossum's remarks that "there are certain introductions to programming that are fun for kids to do, but they're not fun for all kids, and I don't think I would want to make it a mandatory part of the curriculum."
This discussion has been archived. No new comments can be posted.

Guido van Rossum Explains How Python Makes Thinking in Code Easier

Comments Filter:
  • "Nearly all said something like 'Python is beautiful.' They loved its readability -- they found that it was far easier to glance at Python code and see its intent",
    but-
    " ...There's an implicit suggestion... ...to take a little more time in order to make your code more interpretable to someone else in the future" ?

    Ummm...
    • by drinkypoo ( 153816 ) <drink@hyperlogos.org> on Sunday December 01, 2019 @07:39PM (#59474672) Homepage Journal

      Even if it were true, they're lauding making it more beautiful to them at the expense of making it more interpretable by software. When you C&P a code sample and destroy the formatting, and it no longer works, is that beautiful?

      • by gl4ss ( 559668 ) on Sunday December 01, 2019 @10:53PM (#59475240) Homepage Journal

        invisible characters mattering to code sucks. thing is, it's plenty easy to find coders who find python just abhorrent.

        also the way that arrays etc work is nice for doing some operations on them but eh, saying that they are intuitive is just dishonest - and in general that you just kinda have to know what some variable is as you can't even tell it from looking at code that is using it if it's an array - a divide can be for every element or it can be for a single number.

          # restore
                        cropped_vertices = np.reshape(cropped_pos, [-1, 3]).T
                        z = cropped_vertices[2,:].copy()/tform.params[0,0]
                        cropped_vertices[2,:] = 1
                        vertices = np.dot(np.linalg.inv(tform.params), cropped_vertices)
                        vertices = np.vstack((vertices[:2,:], z))
                        pos = np.reshape(vertices.T, [self.resolution_op, self.resolution_op, 3])

        ------------------
        what I have noticed is that people who start with python stay with python and can't do _anything_ with any other language even if it would be a much better fit than trying to do everything with python. There's also a large segment of automated data processing research people (who keep insisting calling it AI for job purposes) who only use python and use only python bindings into libraries that are not written with python - then if you will try to find how said libraries are supposed to be used you will only stumble upon same copypasted python code over and over and over again.

        There are worse things though - ever read an introduction to any ADA programming course/book ? you know that it's MILSPECCCCCCCC and superior for parallel programming to any other language.. at least according to the introductions that often go for pages and pages to justify the existence of the language(and the course/book will invariably just present you with basic equivalent programming).

        • Beautiful and intuitive are relative. To me as a long time Matlab user anything that does not try to look like Matlab is not intuitive. This whole thing sound like a bunch of folks patting each other their backs for how good job they did. Yes, Python is pretty good, but not perfect or a pinnacle of engineering. The main quality of Python is that it is open and free as in beer and free as in freedom. Given enough time Matlab will go the way of Borland Pascal.
          • >To me as a long time Matlab user anything that does not try to look like Matlab is not intuitive.

            *Hold gun to your head* WHAT IS THE FIRST INDEX OF AN ARRAY?!

    • by Bengie ( 1121981 )
      The real "ummm" is this

      When you meet a coder, you're meeting someone whose core daily experience is of unending failure and grinding frustration

      Coding is the easiest part of programming, and "trial and error" programming is just throwing shit at the wall to see what sticks. Design your crap before you write a single line of code. "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."

      When I first started programming, I had to work with a server admin in order to get some of my projects deployed. We went through the process and he told me every step of the deployment was to reduce and pre

  • by 110010001000 ( 697113 ) on Sunday December 01, 2019 @07:46PM (#59474704) Homepage Journal

    Another anti-CS education screed by theodp. How predictable. Why doesn't he want kids to be taught CS?

    • Software Development is a discipline that requires high intelligence and a certain mindset that most people don't have and can't learn. There is a reason why everyone can't be an artist. Likewise software development is a niche discipline. There is a fundamental difference between exposing children to a few concepts to see who does and doesn't have an aptitude and making it mandatory beyond an intro course. Software Development, like art, should be an elective. If you look at the software landscape as it is
      • if you ever want to have a seriously violent cry and can't quite get it out, read this codebase and have a think about what that quality implies: https://github.com/lammps/lamm... [github.com]

    • That's it. Python is a bit on the barefoot side for my taste. Not nearly as bad and PHP and Node, but still bad.

  • by jrumney ( 197329 ) on Sunday December 01, 2019 @07:51PM (#59474718)

    the english language is also beautiful when shorn of ugly punctuation
        it reads like
            poetry
        imagine reading a whole novel
            like this

    • I usually read entire books that don't have curly braces strewn throughout. Most code is indented and the last thing I would want to do is read it if it wasn't, curly braces or not. What's your point?
  • by aberglas ( 991072 ) on Sunday December 01, 2019 @07:52PM (#59474722)

    Maybe not as ugly as Perl or PHP.

    Without static typing it is garbage. With static typing it is not much different from Java or C#, except that it does not compile down to machine code. The correct solution is type inference, which C# and even Java got right eventually.

    The correct solution to {}s is the pre-C one -- end if or fi. That way you know things are matched up sensibly without needing and IDE.

    • And static typing should be at compile time, not run time. I want type errors without running the code. PHP only does run time static typing.

      • by jbengt ( 874751 )

        And static typing should be at compile time, not run time.

        Interpreted code should have static typing done at compile time. Gotcha.

    • I have just been playing with Python for a couple months now, and I don't understand why they thought that un-typed/dynamically-typed variables were a good thing to implement.
      Early on, most of the errors I seemed to get were type mismatches where I had to go in and write enough code to force a proper type conversion.
      It just makes more sense to me to force type declaration along with the variable itself.

      Also We Note.... Visual Basic had that a long time ago, and found it to be much more of a problem tha
      • by sodul ( 833177 ) on Sunday December 01, 2019 @11:03PM (#59475276) Homepage

        Iâ(TM)ve used Python for over 10y and started using mypy this year on a large-ish project. The type annotation was a little weird at first and it still has ways to go but it is definitely helpful, especially with an IDE to help deal with a high number of custom classes and types that may have similar names and functionality.

        Guido worked on mypy at DropBox and it took a few years for the typing to be solid enough for production development but we are now sold on it. Use an IDE that also understand type annotation and things are just much faster to code. I refer to the official docs to check the syntax a lot less than I used to.

        If you are doing any serious work in Python you should use a modern IDE and make pylint + mypy part of your CI pipeline.

      • by caseih ( 160668 )

        Static typing is completely incompatible with the way Pythons variables work. Variables are not boxes. They are names bound to objects. Furthermore, strong dynamic typing leads to the powerful concept of duck typing (similar but more flexible than polymorphism). If you're not using these features to your benefit then I suspect are will find (are finding) Python to be awkward and frustrating. In that case you're better off using a more appropriate language for your needs.

        Many people have been using Python

      • by JaredOfEuropa ( 526365 ) on Monday December 02, 2019 @02:29AM (#59475634) Journal
        To be honest, the whole bracket vs. whitespace thing is a non-issue in my experience. It's not that often that I have to think very hard about brackets or whitespace in Python; if something doesn't work because of that, the cause usually becomes apparent upon inspection very quickly. Arguing about which is superior is a bit like arguing about where the curly should go (K&R vs BSD): each has their own merits, but in the end it really doesn't matter much (no really, not even if you mix these styles).

        One advantage of brackets is that they have some redundancy, in a way: your code will have brackets to form code blocks, and will have indentation to visually set those blocks apart. If you somehow lose a curly, it'll be clear where it belongs thanks to the indentation. And (far more common) if the indentation gets messed up, your code will still work even though it'll look like crap, and restoring the formatting will be easy.
    • Experience indicates static typing has no added value. It was needed in C for memory allocation, not so much for safety. When you rely on typing for safety you miss the worst kind of errors -- e.g. passing a wrong floating-point number. Static typing does nothing to catch that. Humans are also pretty bad at catching that.
      • by caseih ( 160668 )

        How does dynamic typing, specifically doing it in Python, help with this particular "worst kind of [error]?" I can see how unit testing and contracts could stop this sort of error (in any language). Just curious about the implication that dynamic typing might make things better in this case.

      • by jeremyp ( 130771 )

        Well my experience shows that strong typing helps me find all sorts of errors at compile time that I wouldn't otherwise find until runtime.

        A particularly bad problem is not having to declare variables at all such that mistyping a variable name doesn't flag an error but just creates a new variable. Strong typing helps avoid large classes of errors and also helps document the function. It really winds me up looking at a python function declaration to find out what I need to pass it and finding that it gives

        • by tippen ( 704534 ) on Monday December 02, 2019 @08:14AM (#59476134)

          +1000

          On large Python code bases, the lack of static typing means you frequently have to crawl down through multiple layers to figure out what type the code is actually expecting.

          If all you are doing is using Python for simple scripting, dynamic typing is fine and makes things easy. For production code on serious projects, it's one of Python's bigger drawbacks.

  • (sigh) (Score:5, Insightful)

    by fahrbot-bot ( 874524 ) on Sunday December 01, 2019 @07:55PM (#59474726)

    Shorn of curly brackets, indented in elegant visual shelves, anything written in Python really looks like modern poetry.

    Oh, for frack's/frell's sake. Just about any code can be (or made to look) elegant or not -- including in Python.

    What has he taken away from his thirty year journey with Python?

    Please say, "I wish I had included support for brace-delimited block delimiters." [fingers crossed]

    "I have learned that you can't do it alone, which is not an easy lesson for me. I've learned that you don't always get the outcome that you went for, but maybe the outcome you get is just as good, or better."

    Damn.

    Look, you can get all teary-eyed about Python, but it's just another tool that can be used and misused. There's almost nothing one can do in Python that can't be done in Perl and vice-versa -- or even in Java, but that's not a scripting language. I've been using Perl since way before Python was invented and, while I can read and debug Python -- like most programmers can with almost any language after some experience -- so-far, I haven't had any need to really learn it or code in it. I have it on my list of things to do, but I sincerely dislike white-space block delimiters.

    • here's almost nothing one can do in Python that can't be done in Perl and vice-versa

      How are Perls machine learning libraries? Or numerical analytic? How narrow minded are you guys that *your* use case is the only usecase for code.

      • here's almost nothing one can do in Python that can't be done in Perl and vice-versa

        How are Perls machine learning libraries? Or numerical analytic? How narrow minded are you guys that *your* use case is the only use case for code.

        I feel you passion, but your statement doesn't disprove mine. Those libraries could be (re)written in Perl -- if they don't already exist somewhere. Both languages support enough similar features so problems that can be solved in one could be similarly solved in the other. So, be more careful before throwing around that "narrow-minded" thing ...

    • Re:(sigh) (Score:5, Informative)

      by theCoder ( 23772 ) on Monday December 02, 2019 @06:18AM (#59475914) Homepage Journal

      If you think the whitespace thing is annoying, wait until you learn about some of the other fun things.

      * Sometimes you have to pass an object to a function and sometimes you have to call a function on the object. For example, to find the first instance of a character in a string, you call "find()" on the string. But to find the length of a string, you call the global function "len()" with the string. That one took me a while to figure out when I first started with Python, as the str class documentation has information on many methods, but none of them returns the length of the string. Well, there is __len__(), but...

      * Private methods on a class are denoted by starting with two underscores. But that's just a convention. You could easily call somestr.__len__() to get the length, which I did until I learned that it was supposed to be len(somestr). Which, AIUI, is implemented by calling __len__() on whatever object it is passed. There's probably some advantage to this, but I cannot see how it is better than just standardizing on classes having a len() method that people can call, which seems to be more in line with the whole duck typing idea. Maybe it's more historical than deliberate. Certainly Python wouldn't be the only language with historical baggage.

      * I still haven't quite figured out how to correctly use import statements. Sure, simple ones are easy, but when should I use "import a.b.c" vs. "from a.b import c"? Is it just a preference, or is there a more substantive difference? And why does there have to be a file called "__init__.py" in each directory? There probably is a good reason, but it can be a real PITA, especially if you forget about it.

      * Methods on classes in Python use a "self" variable to refer to the object. This is fine, and I guess it's fine that each class method has to take that as a parameter explicitly, but that variable also has to be used explicitly, whether setting variables or calling other class methods. An argument could be made that Python isn't really an OO language, but this really makes it obvious it isn't.

      * Some of those cool packages come with some annoying drawbacks. At $EMPLOYER, we have a script that can do some processing using Tensorflow. It can do other things as well, but because it uses TF, it has to load it every time, even just to print the help statement, and that can take several seconds. Other imports, like matplotlib will fail to initialize and crash the script if DISPLAY isn't set, which is kind of annoying if the script is running from a cron job where there is no DISPLAY.

      And this is just a stylistic complaint, but I find that Python style pushes a lot of underscores. Whether it is to mark something as "private", or to separate words in function names C style (i.e., "do_something"). Even though I mostly do C++ work, I've gotten more used to the more Java style "doSomething" camel casing. The C++ standard library is more C like, but many other libraries, as well as the large code base I work on at $EMPLOYER, tend to use camel case. But this is more a cultural thing than anything really technical. Kind of like braces vs. whitespace (though like most old-skool coders, I prefer braces as being more explicit).

      This isn't to say that Python is all bad! It is really nice to be able to dump out a 2d array as an image through a nice package someone wrote. Just that no language is perfect, and it seems like lots of people look at Python through rosy glasses. I wonder if the people who wrote Numpy and some of the other more important Python libs had written them as Perl modules instead if Perl would be just as popular. Perl was really popular for a while mostly because of CGI.pm. Slashdot itself uses Perl because of that. Of course a lot of people consider the $@% decorations on variables to be "ugly" and very few people really understand regular expressions which seem more core to Perl than any other language, and between the two, Perl has a hard time overcoming the "line noise" reputation. So Perl is probably past its peak popularity.

      • I'm by no means a pro, but I've got to agree - Python is nice, but it's not short of weird foibles that catch you out.

        You mention len() - that seems really weird to me, and that there isn't a builtin on list and string objects to do the same thing seems even more weird.

        I also find joining a list into a string weird with ' '.join(my_list). That seems backwards, and although explained away in the docs, I'm left unconvinced the more usual mylist.join(' ') isn't easier to understand.

        I'm also with you on the und

  • Utter Rubbish (Score:5, Insightful)

    by niftydude ( 1745144 ) on Sunday December 01, 2019 @07:57PM (#59474736)
    White space block control makes python the least readable of all languages. Give me curly brackets any day.

    And the variable creation system is a nightmare for readability. When reading code, what type is variable y when y =someFunction(x)? Whatever the function it returned, and good luck digging down several layers of libraries, abstraction and logic to try to find out. You can't read code if you don't even know what type your variables are going to be.

    Shorn of curly brackets, indented in elegant visual shelves, anything written in Python really looks like modern poetry.

    This is a classic case of form over functionality and whoever said this has never had to read code in order to add features or debug it.

    • Hear, hear! (Score:2, Informative)

      by mschaffer ( 97223 )

      Wow, so if Python's says it's better, we are to believe it's better? Sounds like a cult.
      Python's use of whitespace as delimiters is abhorrent.
      Duck typing is just wrong.

    • Python allows annotations to document parameter and return types as well as variable types. Most other languages have some sort of auto typing system ("auto" in C++, "var" in C#) to behave more like Python. So these days you can do it either way in most languages. If you're writing bad code or working with people who don't document their code that's a problem regardless of language.

  • Forced indentation (Score:5, Insightful)

    by Dan East ( 318230 ) on Sunday December 01, 2019 @08:03PM (#59474750) Journal

    I like how forced indentation that has explicit meaning to the code is trumpeted as "beautiful", "readable", "poetry" when it really stems from implementing the simplest parser possible. They force these constraints on the developer due to limitations they built into the environment that interprets the language, then they make it sound like that's the greatest thing since sliced bread.

    indented in elegant visual shelves, anything written in Python really looks like modern poetry.

    I can't remember the last time I looked at code written in ANY structured language that wasn't indented in some meaningful and consistent way (code blocks and data structures indented with depth, etc). Heck, any modern IDE or even just source simple code editors handle the indentation automatically.

    When you meet a coder, you're meeting someone whose core daily experience is of unending failure and grinding frustration.

    What the hell? Really. What the hell? I'm sorry, but I very much enjoy my occupation, and to say the fruit of my work is "unending failure"... thanks for the insult, loser. And that comes from someone who maintains a complex app with both native iOS and Android source bases.

    Maybe Python is so often used to create far lighter-weight things than native iOS or Android apps, or drivers, or mission critical code, that a developer feels a little more free and frivolous throwing together some scripts to do a little something here and there. Man, just the summary is so full of pomp and arrogance, I don't want to risk reading the article or I might be cleaning vomit off my keyboard tonight.

    • When you meet a coder, you're meeting someone whose core daily experience is of unending failure and grinding frustration.

      What the hell? Really. What the hell?

      Probably a Python programmer with a sticky Tab key ...

    • Heck, any modern IDE or even just source simple code editors handle the indentation automatically.

      Except in Python. Strip all the leading white-space from Perl, C, Java, Ksh, etc... and an editor/IDE like Emacs, Eclipse, etc... can easily re-indent the code and have it be readable and functional. Not so with Python -- manual re-indenting required.

      • How often do you ever do this or does this ever happen? Do you have computer gnomes that just go through and break your whitespace? What are you doing to your plain text files that whitespace just appears a disappears?

        Your mythical 'but the whitespaces' is literally never an issue when writing Python for me.

        • How often do you ever do this or does this ever happen?

          As I type code I often hit re-indent in my editor to clean up the indentation - sometimes I'm deleting parts of blocks or moving code to a different block level, sometimes I just end up typing a bit off-indent by accident.

          I've used a lot of different programming languages - including Python. Python was the singular language I simply could never like, precisely because you cannot clean up indents automatically and be able to visually verify code blockin

    • by Jeremi ( 14640 )

      I like how forced indentation that has explicit meaning to the code is trumpeted as "beautiful", "readable", "poetry" when it really stems from implementing the simplest parser possible.

      No, that's simply not the case. Implementing a parser that ignores whitespace and requires curly-braces (or whatever) is not significantly harder (or easier) than a parser that uses white-space for that purpose.

      For better or worse, Python's white-space policy was based on how Guido wanted the language to work -- not on Guido's alleged inability to write a curly-brace-style parser.

      • by jrumney ( 197329 )

        For better or worse, Python's white-space policy was based on how Guido wanted the language to look

        FTFY.

    • by gl4ss ( 559668 ) on Monday December 02, 2019 @01:07AM (#59475530) Homepage Journal

      python cannot be automatically beautified to your liking. Most other languages can be, making them inherently at least as readable if not more readable than python.

      with python you don't usually know, without just "knowing", what a variable is.

      also python has all the fun times of having different versions of the language that are incompatible - mostly python is just used in the same way shell scripts or bat files would be though. even more so than php is used.

      this can be incredibly powerful of course - just like visual basic with excel can be incredibly powerful at handling data - but nowhere near as versatile as useful as applications or programs that are written with other languages that the python batch files then rely on to get anything done. this leads to that it being fairly unlikely that you would be using anything written with python on your daily desktop usage. it's far more likely that you use some service that is written in php even.

      but like, come on, would you ask the creator of the parser why the thing it parses is beautiful? really? why?

  • "You primarily write your code to communicate with other coders, and, to a lesser extent, to impose your will on the computer,"

    No, that's literature. The primary purpose for code is to have the computer perform some desired functions. A secondary goal is to also make that code readable / understandable for humans -- others *and* you (said as someone who returned to some code written years before and thought "WTF?" -- because if the code doesn't do anything useful, then it doesn't really matter how readable it is.

    • by maitai ( 46370 )

      I think it's funny when I leave a comment /* drunk, fix later */

      • I think it's funny when I leave a comment /* drunk, fix later */

        I was a grader in college back in the mid 80s and saw this in someone's semester OS class project -- simulating an interactive OS in C. Made me laugh.

        unsigned int slice; /* a fruit-flavored soft drink */

  • by 0100010001010011 ( 652467 ) on Sunday December 01, 2019 @08:14PM (#59474770)

    Not everything has to be bare metal C. Ignore politics, your stance on Python shows how "Old Men Yell At Clouds" most of you are. It's used daily in almost every science. There are well written libraries for everything from astronomy [astropy.org] to controls [readthedocs.io] to plotting [pydata.org]. Not to mention numpy and scipy.

    Most 'hello worlds' into any sort of high level wrapper on machine learning is a few lines of code at most. Not everything *has* to be hard.

    This isn't going to ruin what ever pedestal you put CS on but to teach engineers, scientists (in other domains), etc how to code. Get off your high horses about some purity test for what programming is to everyone. That's how science and discovery happens.

    The picture of the blackhole, was made using Python [pythonlibrary.org] (Numpy, Scipy, Pandas, Jupyter, Matplotlib, & Astropy). NASA uses Python for data analysis. A lot of companies do. It's eating into the market spaces of Matlab, SAS, etc.

    And yes, the fastest stuff is still written in C/FORTRAN. No one is arguing that.

    No one is going to take your toys away. Perl5 still works. PHP will never die. COBAL programmers can still make great money. Rust has a long way to go to replacing C/C++ in Embedded. I just got an e-mail about Ada.

    Try it, it's not that horrible.

    • Mostly very good points.

      Try it, it's not that horrible.

      I don't think anyone is arguing Python is "that* horrible, but it's not the "best thing since sliced bread" as Guido and his disciples proclaim. It's a tool; one with many useful features and libraries but also with one huge mistake (or, at least, bad idea) -- only supporting white-space block delimiters. It's completely unnecessary and causes some severe problems should leading white-space get lost/removed. And, again, it's *completely*, *totally* unnecessary. Also, for the most

  • Regex is a mess, map/reduce/filter is a mess, other than that it's ok, but that's a big chunk of what I do in code.
    • I used to really hate Python's regex, I had gotten used to Perl's inline regex and just thought that's how the world should work. Then I spent some time to actually understand how Python did things and my opinion completely reversed.

      Python strings are objects rather than just an array of bytes in drag. They have a lot of really useful built-in methods that handle the simple transformations you might do with a regex in Perl. The RE module is also very expressive with a lot of helper methods and returns objec

      • For example: Javascript is an example of a language with sane regex and map/reduce/filter:

        "foobar".match(/foo/) // truthy
        [1,2,3].map(n => n + 1) // [2,3,4]

        The equivalent of these in Python is a nightmare.
      • What if we *never use Regex*? Who cares how good a regex module is if it's never in our use cases?

        How is Perl's numerical analytic library? Machine learning libraries?

  • ...[Python creator] Guido van Rossum "thinks Python may be closer to our visual understanding of the structures that we are representing in code than other languages.

    Well, what in the world would you expect him to say? He created Python to express how he thinks of coding. Why is it a surprise that Python represents how he thinks of coding?

    • ...[Python creator] Guido van Rossum "thinks Python may be closer to our visual understanding of the structures that we are representing in code than other languages.

      Well, what in the world would you expect him to say? He created Python to express how he thinks of coding. Why is it a surprise that Python represents how he thinks of coding?

      Wonder how he thinks about other things? Does he have bookends on his shelves or are things falling off the ends all the time. :-)

  • A language creator is obviously going to think the language he wrote is the best one, he designed it reflect what he thinks. Others will obvious think differently, the most impartial judges are developers that have not written their own language because one exists that fits their needs.

    • by laird ( 2705 )

      Based on popularity, Python is a very good language - it's number three and growing rapidly. https://stackify.com/popular-p... [stackify.com] behind only Java (shrinking slowly) and C (growing slowly), and well ahead of number 4 (C++, shrinking rapidly). I use many different languages to solve many different problems, and Python is particularly easy to teach/learn and has amazing libraries that make it very easy to use in many domains (e.g. NumPy). So it's displacing more specialized languages (e.g. R).

  • I think we should only teach English, Drawing (not art), and Math (up to multivariable calculus, number theory, and linear algebra), and nothing else, until high school.

    With those skills, you can learn other stuff in high school .. it will make more sense.

  • Why is it the case that so many in this industry seem to be convinced that they have found the Holy Grail?
  • Expressing your respect for others and their time through the quality of your work is an ethos that Van Rossum has stealthily propagated in the world. "You primarily write your code to communicate with other coders, and, to a lesser extent, to impose your will on the computer," he says...

    What the hell is he talking about? 99.99999% of computer code I have written has never nor will it ever be seen by another programmer. The point it to *make the computer compute things", I am no

  • by musicmaker ( 30469 ) on Sunday December 01, 2019 @10:20PM (#59475124) Homepage

    Look, it's all very well to talk about how easy Python is, but it doesn't matter. What actually matters is how good a language is at expressing what you want the computer to do for you. We talk a lot about programming ideals, things like the SOLID principles, and Onion/Hexagonal architecture. But one of the things that's not talked about nearly enough is Category Theory, and Type Arrows. If you can't reason about what goes into a function, and what comes out of a function, then you don't have a complete way to express what you're programming about. If you can't write functions that work in an asynchronous way that are without side-effects and closures then you're going to get yourself in trouble. This pretty much rules out both Javascript and Python as complete languages. They maybe easy to work with, but they are incomplete at expressing intent, and therefore going to cause you heartache.

  • Sorry Guido, too late, it's a requirement in Australia.
    They make the jocks learn to code too, character building, like wearing pink.

  • ... is the only programming language that is used professionally in *every* field. Python is the modern days true general purpose language, and an easy and fun one to learn at that.
    Aside perhaps from some newfangled avantgarde purely functional language that enforces functional programming more strictly or has a better control and handling of concurrency I would consider Python the go to language for just about anybody and any problem aside from perhaps preheating highly specialised systems such as spacecra

  • by bluFox ( 612877 ) on Monday December 02, 2019 @02:02AM (#59475610) Homepage Journal
    def my_cmd(val=None): if val is None: val = [] --- Python has its share of warts, for example, changing the default value of `val` from `None` to `[]` will make the value of `val` shared between all instances. Python got one thing right, which is the indentation sensitive syntax.

Beware of all enterprises that require new clothes, and not rather a new wearer of clothes. -- Henry David Thoreau

Working...