Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Steven D'Aprano
On Sun, 18 Feb 2018 19:38:03 -0500, Dennis Lee Bieber wrote: > On Mon, 19 Feb 2018 00:09:40 + (UTC), Steven D'Aprano > declaimed the following: > > >>Or more realistically, suppose you want your type system to ensure that >>you don't lay off the wrong workers: >> >>"employee records where t

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Anders Wegge Keller
På Mon, 19 Feb 2018 08:47:14 +1100 Tim Delaney skrev: > On 18 February 2018 at 22:55, Anders Wegge Keller wrote: > > That list is not only weakly typed, but rather untyped. There are no > > safeguards in the language, that enforce that all elements in a list or > > other container are in fact

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Chris Angelico
On Mon, Feb 19, 2018 at 1:14 PM, bartc wrote: > On 19/02/2018 00:09, Steven D'Aprano wrote: > >> Sure, but only the most boring, uninteresting kinds of types can be so >> named. The point is that "sufficiently fine-grained types" can be >> arbitrarily complex. > > > I don't think so. > > If a hum

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread bartc
On 19/02/2018 00:09, Steven D'Aprano wrote: Sure, but only the most boring, uninteresting kinds of types can be so named. The point is that "sufficiently fine-grained types" can be arbitrarily complex. I don't think so. If a human finds it hard to give it a meaningful name, no algorithm wil

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Ben Finney
Richard Damon writes: > Doesn't sound like the sort of thing that you should expect a Type > Checker to find. Yes, exactly. This point is evidently ignored by people who moan that Python, though it has strong types, is prone to bugs because it has dynamic binding. As Steven points out, and you

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Richard Damon
On 2/18/18 8:16 PM, Ben Finney wrote: Dennis Lee Bieber writes: On Mon, 19 Feb 2018 00:09:40 + (UTC), Steven D'Aprano declaimed the following: Or more realistically, suppose you want your type system to ensure that you don't lay off the wrong workers: "employee records where the length

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Ben Finney
Dennis Lee Bieber writes: > On Mon, 19 Feb 2018 00:09:40 + (UTC), Steven D'Aprano > declaimed the following: > > >Or more realistically, suppose you want your type system to ensure > >that you don't lay off the wrong workers: > > > >"employee records where the length of employment is greater

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Steven D'Aprano
On Sun, 18 Feb 2018 08:02:10 +1100, Chris Angelico wrote: [...] >> The usual response to that is to make ever-finer-grained types, until >> the type-system can prove the code is correct. >> >> integers >> positive integers >> positive integers greater than 10 >> positive integers greater than 10 b

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Tim Delaney
On 18 February 2018 at 22:55, Anders Wegge Keller wrote: > På Sat, 17 Feb 2018 15:05:34 +1100 > Ben Finney skrev: > > boB Stepp writes: > > > > He blithely conflates “weakly typed” (Python objects are not weakly, but > > very strongly typed) > > Python is more strongly typed than PHP, but that

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread MRAB
On 2018-02-18 15:44, Michael Torrie wrote: On 02/18/2018 05:45 AM, Anders Wegge Keller wrote: På Sun, 18 Feb 2018 07:34:03 -0500 Richard Damon skrev: Python is much stronger typed than PHP, because in PHP you can do things like 1 + '2' and get 3, as string values will naturally convert thems

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread MRAB
On 2018-02-18 11:55, Anders Wegge Keller wrote: På Sat, 17 Feb 2018 15:05:34 +1100 Ben Finney skrev: boB Stepp writes: He blithely conflates “weakly typed” (Python objects are not weakly, but very strongly typed) Python is more strongly typed than PHP, but that doesn't really say much

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Michael Torrie
On 02/18/2018 05:45 AM, Anders Wegge Keller wrote: > På Sun, 18 Feb 2018 07:34:03 -0500 > Richard Damon skrev: > >> Python is much stronger typed than PHP, because in PHP you can do things >> like 1 + '2' and get 3, as string values will naturally convert >> themselves to numbers, Python won't

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Abdur-Rahmaan Janhangeer
have the impression he is not a python coder Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ On 17 Feb 2018 07:22, "boB Stepp" wrote: > This article is written by Nathan Murthy, a staff software engineer at > Tesla. The article is found at: > https://medium.com/@natemurthy/all-the-t

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Anders Wegge Keller
På Sun, 18 Feb 2018 07:34:03 -0500 Richard Damon skrev: > Python is much stronger typed than PHP, because in PHP you can do things > like 1 + '2' and get 3, as string values will naturally convert > themselves to numbers, Python won't do this. Yes Python will freely > convert between numeric t

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Richard Damon
On 2/18/18 6:55 AM, Anders Wegge Keller wrote: På Sat, 17 Feb 2018 15:05:34 +1100 Ben Finney skrev: boB Stepp writes: He blithely conflates “weakly typed” (Python objects are not weakly, but very strongly typed) Python is more strongly typed than PHP, but that doesn't really say much. Ho

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Ned Batchelder
On 2/18/18 6:57 AM, bartc wrote: On 18/02/2018 11:45, Ned Batchelder wrote: Let's not go down this path yet again. We've heard it all before. Bart: stop it.  Everyone else: stop it. :) Well, this was a rare instance of someone admitting that a simple and smaller codebase has benefits in bein

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Anders Wegge Keller
På Sat, 17 Feb 2018 15:05:34 +1100 Ben Finney skrev: > boB Stepp writes: > He blithely conflates “weakly typed” (Python objects are not weakly, but > very strongly typed) Python is more strongly typed than PHP, but that doesn't really say much. However, compared to a language like C, there a

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread bartc
On 18/02/2018 11:45, Ned Batchelder wrote: Let's not go down this path yet again.  We've heard it all before. Bart: stop it.  Everyone else: stop it. :) Well, this was a rare instance of someone admitting that a simple and smaller codebase has benefits in being able to detect problems such as

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread Ned Batchelder
On 2/18/18 6:33 AM, bartc wrote: On 18/02/2018 01:39, Chris Angelico wrote: On Sun, Feb 18, 2018 at 12:31 PM, bartc wrote: On 18/02/2018 00:45, Chris Angelico wrote: On Sun, Feb 18, 2018 at 11:13 AM, bartc wrote: It's text, but it is an intermediate or "object" file. It's not doing poin

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-18 Thread bartc
On 18/02/2018 01:39, Chris Angelico wrote: On Sun, Feb 18, 2018 at 12:31 PM, bartc wrote: On 18/02/2018 00:45, Chris Angelico wrote: On Sun, Feb 18, 2018 at 11:13 AM, bartc wrote: It's text, but it is an intermediate or "object" file. It's not doing pointless stuff; it's coping with the

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Michael Torrie
On 02/17/2018 06:31 PM, bartc wrote: > It could well do all that. But it surely cannot need 18,000 lines' worth > to do it; that much should be obvious to anyone. And in fact, for > building with MS's Visual Studio, it doesn't use that file at all, but > something smaller. (Although the MS build

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Chris Angelico
On Sun, Feb 18, 2018 at 12:31 PM, bartc wrote: > On 18/02/2018 00:45, Chris Angelico wrote: >> >> On Sun, Feb 18, 2018 at 11:13 AM, bartc wrote: > > >> It's text, but it is an intermediate or "object" file. It's not doing >> pointless stuff; it's coping with the myriad platforms and variants >> t

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread bartc
On 18/02/2018 00:45, Chris Angelico wrote: On Sun, Feb 18, 2018 at 11:13 AM, bartc wrote: It's text, but it is an intermediate or "object" file. It's not doing pointless stuff; it's coping with the myriad platforms and variants that Python has support for. It could well do all that. But it

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Chris Angelico
On Sun, Feb 18, 2018 at 11:13 AM, bartc wrote: > On 17/02/2018 22:09, Chris Angelico wrote: >> >> On Sun, Feb 18, 2018 at 8:50 AM, bartc wrote: > > >>> That's a very interesting observation. >>> >>> I've frequently made the complaint about systems that I consider large >>> and >>> complex also le

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread bartc
On 17/02/2018 22:09, Chris Angelico wrote: On Sun, Feb 18, 2018 at 8:50 AM, bartc wrote: That's a very interesting observation. I've frequently made the complaint about systems that I consider large and complex also leading to such issues, where no one individual can see the whole picture.

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Chris Angelico
On Sun, Feb 18, 2018 at 8:50 AM, bartc wrote: > On 17/02/2018 20:11, Chris Angelico wrote: >> >> On Sun, Feb 18, 2018 at 1:47 AM, Ian Kelly wrote: > > >>> Okay, I'm curious. How did C# force you to make extra HTTP requests >>> that were no longer necessary when you rewrote in Python? >> >> >> It

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread bartc
On 17/02/2018 20:11, Chris Angelico wrote: On Sun, Feb 18, 2018 at 1:47 AM, Ian Kelly wrote: Okay, I'm curious. How did C# force you to make extra HTTP requests that were no longer necessary when you rewrote in Python? It didn't *force* those requests to be made, but the code was so large a

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Chris Angelico
On Sun, Feb 18, 2018 at 5:05 AM, Steven D'Aprano wrote: > On Sat, 17 Feb 2018 15:25:15 +1100, Chris Angelico wrote: > >> 1) Type safety. >> >> This is often touted as a necessity for industrial-grade software. It >> isn't. There are many things that a type system, no matter how >> sophisticated, c

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Chris Angelico
On Sun, Feb 18, 2018 at 1:47 AM, Ian Kelly wrote: > On Fri, Feb 16, 2018 at 9:32 PM, Chris Angelico wrote: >> You'd be surprised how rarely that kind of performance even matters. >> The author of that article cites C# as a superior language, but in the >> rewrite from C# to Python (the same one I

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Steven D'Aprano
On Sat, 17 Feb 2018 15:25:15 +1100, Chris Angelico wrote: > 1) Type safety. > > This is often touted as a necessity for industrial-grade software. It > isn't. There are many things that a type system, no matter how > sophisticated, cannot catch; The usual response to that is to make ever-finer-

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Mark Lawrence
On 17/02/18 09:29, Gregory Ewing wrote: boB Stepp wrote: "Python is viewed as a ubiquitous programming language; however, its design limits its potential as a reliable and high performance systems language. Unfortunately, not every developer is aware of its limitations." "The Toyota Corolla is

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread bartc
On 17/02/2018 14:30, Steven D'Aprano wrote: And ironically, in a *modern* statically typed language, you may not even need the type declarations. After all, in a modern type-checker, the compiler can infer that since foo returns 'hello world', it must return a string; it can probably even infer

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Ian Kelly
On Fri, Feb 16, 2018 at 9:32 PM, Chris Angelico wrote: > You'd be surprised how rarely that kind of performance even matters. > The author of that article cites C# as a superior language, but in the > rewrite from C# to Python (the same one I mentioned in the other > post), I sped the program up i

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Steven D'Aprano
On Sat, 17 Feb 2018 03:29:49 -0500, Terry Reedy wrote: > His dreadful strawperson code snippet should not be allowed even in a > beginning programming class, let alone in professional programs. > > def foo(x): > if is_valid(x): > return "hello world" > else: > return b

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Chris Angelico
On Sat, Feb 17, 2018 at 10:28 PM, Ben Bacarisse wrote: > Marko Rauhamaa writes: > >> Many people think static typing is key to high quality. I tend to think >> the reverse is true: the boilerplate of static typing hampers >> expressivity so much that, on the net, quality suffers. > > I don't fin

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Ben Bacarisse
Marko Rauhamaa writes: > Many people think static typing is key to high quality. I tend to think > the reverse is true: the boilerplate of static typing hampers > expressivity so much that, on the net, quality suffers. I don't find that with Haskell. It's statically typed but the types are almo

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Marko Rauhamaa
Gregory Ewing : > boB Stepp wrote: >> "Python is viewed as a ubiquitous programming language; however, its >> design limits its potential as a reliable and high performance >> systems language. Unfortunately, not every developer is aware of its >> limitations." > > "The Toyota Corolla is viewed as

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Gregory Ewing
boB Stepp wrote: "Python is viewed as a ubiquitous programming language; however, its design limits its potential as a reliable and high performance systems language. Unfortunately, not every developer is aware of its limitations." "The Toyota Corolla is viewed as a ubiquitous family car; howev

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Terry Reedy
On 2/16/2018 10:22 PM, boB Stepp wrote: This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e To add to what other have said: Here is what the author said about word

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Christian Gollwitzer
Am 17.02.18 um 05:54 schrieb boB Stepp: And this is one I am still puzzling over: Are statically-typed languages inherently "safer" than properly implemented dynamically-typed languages? I can see the advantages of catching type errors at compile time versus run time. If you haven't tried s

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Christian Gollwitzer
Am 17.02.18 um 06:12 schrieb Stefan Ram: Chris Angelico quotes: Python is relatively slow compared to programming languages that run closer to the operating system. The run time of the countdown example above is orders of magnitude faster when implemented in other language runtimes. What s

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
On Sat, Feb 17, 2018 at 12:54 AM, Chris Angelico wrote: > On Sat, Feb 17, 2018 at 5:25 PM, boB Stepp wrote: >> >> I am curious as to what efforts have been attempted to remove the GIL >> and what tradeoffs resulted and why? Is there a single article >> somewhere that collates this information?

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 5:25 PM, boB Stepp wrote: > I've just reread everyone's replies and one point you mentioned about > the GIL caught my eye ... > > On Fri, Feb 16, 2018 at 11:16 PM, Chris Angelico wrote: > >> Asynchronicity and concurrency are hard. Getting your head around a >> program tha

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
I've just reread everyone's replies and one point you mentioned about the GIL caught my eye ... On Fri, Feb 16, 2018 at 11:16 PM, Chris Angelico wrote: > Asynchronicity and concurrency are hard. Getting your head around a > program that is simultaneously doing two things is inherently tricky. >

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 4:11 PM, boB Stepp wrote: > On Fri, Feb 16, 2018 at 10:25 PM, Chris Angelico wrote: > >> >> 1) Type safety. >> >> This is often touted as a necessity for industrial-grade software. It >> isn't... > > Chris, would you mind expanding on this point? What is necessary for > i

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 3:54 PM, boB Stepp wrote: > On Fri, Feb 16, 2018 at 10:05 PM, Ben Finney > wrote: > >> He blithely conflates “weakly typed” (Python objects are not weakly, but >> very strongly typed) with “dynamically typed” (yes, Python's name >> binding is dynamically typed). Those are

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
On Fri, Feb 16, 2018 at 10:25 PM, Chris Angelico wrote: > > 1) Type safety. > > This is often touted as a necessity for industrial-grade software. It > isn't... Chris, would you mind expanding on this point? What is necessary for industrial-grade, safe, robust software? Do statically-typed lan

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 3:36 PM, Steven D'Aprano wrote: > Python is really good for gluing together high-performance but user- and > programmer-hostile scientific libraries written in C and Fortran. You > wouldn't write a serious, industrial-strength neural network in pure > Python code and expect

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread boB Stepp
On Fri, Feb 16, 2018 at 10:05 PM, Ben Finney wrote: > He blithely conflates “weakly typed” (Python objects are not weakly, but > very strongly typed) with “dynamically typed” (yes, Python's name > binding is dynamically typed). Those are two, orthognal dimensions to > describe a language. > > All

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2018 21:22:48 -0600, boB Stepp wrote: > This article is written by Nathan Murthy, a staff software engineer at > Tesla. The article is found at: > https://medium.com/@natemurthy/all-the-things-i-hate-about- python-5c5ff5fda95e > > Apparently he chose his article title as "click ba

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 2:50 PM, Bill wrote: > boB Stepp wrote: >> >> This article is written by Nathan Murthy, a staff software engineer at >> Tesla. The article is found at: >> >> https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e >> >> Apparently he chose his articl

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Chris Angelico
On Sat, Feb 17, 2018 at 2:22 PM, boB Stepp wrote: > This article is written by Nathan Murthy, a staff software engineer at > Tesla. The article is found at: > https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e > > Apparently he chose his article title as "click bait".

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread MRAB
On 2018-02-17 03:22, boB Stepp wrote: This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e Apparently he chose his article title as "click bait". Apparently he does

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Ben Finney
boB Stepp writes: > https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e > As I currently do not have the necessary technical knowledge to > properly evaluate his claims, I thought I would ask those of you who > do. Thank you for asking. The author makes many mistakes.

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-16 Thread Bill
boB Stepp wrote: This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e Apparently he chose his article title as "click bait". Apparently he does not really hate Pytho

<    1   2