Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming Python

What Python Creator Guido van Rossum Thinks of Rust, Go, Julia, and TypeScript (youtube.com) 103

Python's creator Guido van Rossum shared his opinions on other programming languages during a new hour-long interview with Microsoft's principle cloud advocate manager. Some of the highlights:
  • Rust: "It sounds like it's a great language — for certain things. Rust really improves on C++ in one particular area — it makes it much harder to bypass the checks in the compiler. And of course it solves the memory allocation problem in a near perfect way... if you wrote the same thing in C++, you could not be as sure, as compared to Rust, that you've gotten all your memory allocation and memory management stuff right. So Rust is an interesting language."
  • Go and Julia: "I still think that Go is a very interesting language too. Of all the new languages, Go is probably the most Python-ic — or at least the general-purpose new languages. There's also Julia, which is sort of an interesting sort of take on something Python-like. It has enough details that look very similar to Python that then when you realize, 'Oh, but all the indexing is one-based and ranges are inclusive instead of exclusive,' you think, 'Argh!' Nobody should ever try to code in Julia and in Python on the same day.

    "My understanding is that Julia is sort of much more of a niche language, and if you're in that niche, it is superior because the compiler optimizes your code for you in a way that Python probably never will. On the other hand, it is much more limited in other areas, and I wouldn't expect that anybody ever is going to write a web server in Julia and get a lot of mileage out of it. And I'm sure in five minutes that will be on Hacker News with a counterexample."
  • TypeScript: "TypeScript is a great language. You might have noticed that in the past six or seven years, we've been adding optional static typing to Python, also known as gradual typing. I wasn't actually aware of TypeScript when we started that project, so I can't say that we were inspired by TypeScript initially. TypeScript, because it sort of jumped on the JavaScript bandwagon — and because Anders is a really smart guy — TypeScript did a few things that Python is still waiting to figure out. So nowadays, we definitely look at TypeScript for examples. We have a typing SIG where we discuss extensions of the typing syntax and semantics and the type system in general for Python, and we definitely sometimes propose new features because we know that certain features were also originally initially lacking in TypeScript, and then added to TypeScript based on user demand, and [became] very successful in TypeScript. And so now we can see we are in that same situation.

    "Because JavaScript and Python are relatively similar... Much more so than Python and say C++ or Rust or Java. So we are learning from TypeScript, and occasionally, from my conversations with Anders, it sounds like TypeScript is also learning from Python, just like JavaScript has learned from Python in a few areas."

This discussion has been archived. No new comments can be posted.

What Python Creator Guido van Rossum Thinks of Rust, Go, Julia, and TypeScript

Comments Filter:
  • by iggymanz ( 596061 ) on Sunday May 23, 2021 @11:48AM (#61413170)

    Rust allows and has "Unsafe Rust"... because the memory safe Rust doesn't always cut it. It's like a second language lurking in the main one because shit can't always get done with safe Rust. An operating system or system library in Rust will have to have unsafe rust. And there will be bugs...

    • by Darinbob ( 1142669 ) on Sunday May 23, 2021 @11:56AM (#61413190)

      But doesn't that destroy the Rust religion? It's like having an eleventh commandment that says "you can ignore the above if you have a good reason"!

      • Every religionist uses that excuse, though, and it does not appear to destroy their Faith.

        • by gweihir ( 88907 )

          That is why it is called "faith" and not insight or understanding: It is not rational.

      • In the Rust religion only the divine leader can ignore laws by divine mandate, divine intervention prevents it for everyone else. In Rust there is a god.

        In the C++ religion everyone can ignore laws and any attempt at policing to prevent it from happening is comically inept. In C++ there is no god.

        • C++ style was "you can do application layer stuff while still being able to do system level code, but if you do system level code without application level features then we will taunt you mercilessly!"

      • Comment removed based on user account deletion
      • by gweihir ( 88907 )

        Every religion has its dirty secrets, which usually invalidate the whole thing. Rust is no exception.

    • by dremon ( 735466 ) on Sunday May 23, 2021 @12:59PM (#61413412)
      Unsafe Rust is limited to the code sections marked as "unsafe" whereas the whole C or C++ application is unsafe. Those blocks are usually small and well-defined so it makes it much easier to find and fix the bugs if there are any. Also "unsafe" does not break the rules like ownership and borrowing, it only allows to dereference a raw pointer or call another unsafe or external FFI function.
      • Unsafe Rust is limited to the code sections marked as "unsafe" whereas the whole [...] C++ application is unsafe. Those blocks are usually small and well-defined so it makes it much easier to find and fix the bugs if there are any.

        That... doesn't compute.

        The unsafe blocks makes it easy to find unsafe blocks. But any bugs in the unsafe regions renders the whole application unsafe, just as C++. Rust, and other languages, CANNOT guarantee safety beyond the statically checked parts of the code. The unsafe/safe boundary cannot magically stop the propagation of errors from within the unsafe block. In actuality, the "unsafe block" is actually saying "assume this code is safely written" - it's a declaration of "trust me I know what I'm do

        • Some bugs in the unsafe regions may renders the whole application unsafe, that's true. That's still a huge improvement over "A lot of potential harmless looking statement anywhere in the program can renders the whole application unsafe". Indeed, the unsafe/safe boundary is not magic, but it is clearly delimited, and if the code inside the block is clean, then your program is memory safe.
          • C++ static checkers have improved a lot and keep improving. The core guidelines support library and related tools add even more checks continually. Then of course there's the sanitizers for runtime checking which are fast enough to use in some production environments even. There really isn't that much in C++ that is unsafe or uncheckable these days, statically or at runtime.

            So really, you can easily emulate Rust, and I won't be surprised if, in the future, someone implements a checker that precisely impl
            • That's not that easy. Yes C++ static checkers have improved, but the core guidelines will probably never provide the level of memory safety than Rust offers nowadays. There is a point where you can't make C++ safer without breaking the language. That's why Mozilla decided to create a new language despite its huge C++ code base and that Microsoft decide to favor Rust after experimenting with Checked C. They both have a huge base of C++ application with all the tooling possible, but still 70% of their crit
              • You can make C++ safer without breaking the language. Just make things part of the checker instead of the compiler. For example, the checkers already warn (or error) on use-after-move. That gives you Rusts' destructive move semantics without breaking the language.

                It's not so hard to write a checker that forbids the use of pointers outside of functions marked with certain attributes, for example. It won't break the language, because it's not defined as part of the language, but it will be there for projec
    • That's true, but... when memory problems arise in Rust, you only have to look for bugs inside unsafe blocks, that are usually a very small percentage of the codebase. That's a big win.

      • What if your safe block is passing unexpected things into your unsafe block and you're not testing nor realizing it? Any code with an unsafe block in it is unsafe.

    • by gweihir ( 88907 )

      Rust allows and has "Unsafe Rust"... because the memory safe Rust doesn't always cut it. It's like a second language lurking in the main one because shit can't always get done with safe Rust. An operating system or system library in Rust will have to have unsafe rust. And there will be bugs...

      Indeed. And worse, the Rust coders will not have experience doing this and will do much worse than C coders. One of the dirty secrets the Rust fanatics like to sweep under the carpet.

    • Comment removed based on user account deletion
      • No, it's just me pointing out the Rust B.S. when it comes to systems programming. Any code with unsafe block in it is unsafe in its entirety. It's the Rust hype that reality will destroy; Rust programmers might turn out to be even be worse at dealing with their unsafe blocks than experienced C programmers do with system code.

  • I am seeing a lot of devs all over picking up TypeScript for stuff, it seems to be on the increase broadly...

    Python was in the same way, I'm not sure if TypeScript is taking away developers from Python or not. It seems like at the moment the spheres of influence and work seem to be fairly separate.

    Personally I didn't mind the type freedom of good ol' Javascript, but I can see the appeal in TypeScript.

    • Personally I didn't mind the type freedom of good ol' Javascript, but I can see the appeal in TypeScript.

      Typescript is mainly an advantage on larger projects and larger teams. When your project is large enough that you frequently don't know what type a variable is, then it's time for typescrupt.

      • I used to hate typescript, but then things started changing in the structure of data coming from the server (python as it happens) that made me start to value that I could simply change the type in the ts interface and recompile and the compiler would tell me where it was being used with the old type and I'd forgotten.
        I guess that's the same with pretty much any typed language... but it saved me a few times, or at least made things easier/quicker.
        However, there are times when typescript failed to tell me wh

    • by xvan ( 2935999 )
      Python is the defacto language for non programmers:
      Each 21st century non comp-si professional that needs to do some coding, most likely is using python. It's the 90s excel.
      There are some exceptions tho, statistician use R and, as far as I know, some mathematicians still do FORTRAN
      • Python is the defacto language for non programmers:

        An interesting observation but I know a number of older die-hard programmers and newer CS grads, that are all very into Python...

        Have to admit I like the sound of calling it "the programmers Excel" though. :-)

        • An interesting observation but I know a number of older die-hard programmers and newer CS grads, that are all very into Python...

          The lower half of the bell curve needs tools, too.

      • by djinn6 ( 1868030 )

        Excel was, and might still be, the way by which most programming is done. And by programming, I mean instructing the computer to do arbitrary work. Excel is Turing complete after all.

  • > you think, 'Argh!' Nobody should ever try to code in Julia and in Python on the same day.
    This is the reason why I gave up python for julia language. Easy choice when you look at benchmarks, at least for the problems I have to solve.
    • by DrSkwid ( 118965 )

      You can tell Van R has never really used Julia if he thinks it is Python like

      Somehow, I manage to switch between the two when I write code that calls Python *from* Julia.

      If that's the thing that bothers you the most, perhaps computing is not for you.

      • JS as well.

        Van R is a dumbfuck.
        The primary argument for his intelligence and/or wisdom and/or competence seems to be that he created a popular language.
        I suppose that proves that Kanye was right all along. He is a fucking genius.
  • I am much more concerned about having good language standards and multiple vendors. I shrug at the mere thought of using single-vendor, not standardised language in production systems. Think air traffic control written in Python 2...
  • I suppose it is tempting, if the only tool you have is a python, to treat everything as if it were a python.
  • If is not none, if is not none, if is not noneâ¦. Try except if is not none⦠finally isinstance, if is not isinstance, return 0
  • He sounds enthusiastic about the future.
  • Of all the new languages, Go is probably the most Python-ic...

    Except for that whole "Python sucks and Go doesn't" thing.

...there can be no public or private virtue unless the foundation of action is the practice of truth. - George Jacob Holyoake

Working...