back
85 comments
> It's simple (or, at least, you can pretend it is, for casual use)

I'm glad that caveat is there, because "Python is simple" is one of the biggest misconceptions about the language. It's actually a very complex language hiding behind pleasant syntax.

It's heavily used by non-programmers not because it's simple but because it's easy, which isn't the same thing [0]. More specifically, Python makes easy things very easy, at the expense of making difficult things even more difficult.

[0] https://www.youtube.com/watch?v=SxdOUGdseq4

>It's actually a very complex language hiding behind pleasant syntax.

I'm not sure emphasis on very is justified. C++ is a very complex language. Python is just... complex, like every real world language is.

> at the expense of making difficult things even more difficult.

Can you elaborate on this?

Yup. I've said multiple times that Python's superpower is in progressive disclosure of complexity. If it has better dependency story you could go a long while without being overburdened by complexity because you always learn a little more here and a little more there.
> It's heavily used by non-programmers not because it's simple but because it's easy, which isn't the same thing

I burned myself with Micropython. Sometimes the syntax was wrong but the worst was that reading an input did not gave the desired result. You had to run it twice.

>It's actually a very complex language hiding behind pleasant syntax

What are some actual simple modern languages then?

>"Today, there's a different language with ugly historical baggage that enjoys a strong following, *notably amongst people that don't identify as programmers*. *That language is Python*."

>"Python is the new BASIC because *Python is the language that non-programmers always seem to use*"

>"If even a *Python-hater like me* defaults to using Python, then I think it's pretty clear that Python has taken over the world, just as BASIC once did."

1) As a Python fan, I consider this hate speech.

2) I have yet to encounter a software development kit like Visual Basic that makes it easy to write executable files with a GUI.

> 2) I have yet to encounter a software development kit like Visual Basic that makes it easy to write executable files with a GUI.

Lazarus with FreePascal is pretty close with its drag and drop way of creating GUIs and it generates executables.

> As a Python fan, I consider this hate speech.

You know, I am not actually much of free speech absolutist, but this is the kind of statement that makes me more sympathetic to them. When they sometimes express the worry that the category of "hate speech" is going to be stretched to cover any sort of dislike or disagreement, I think this is the kind of thing they have in mind.

I agree, this is a trash post full of hot stinky air : - name-calling without any actual examples - no actual comparison with Basic, the extremely simplistic "popular" sticker covers massive differences in use, users, functional coverage of libraries, and so on - non-programmers that program use python? this is leveraging python's value as a teaching language in the most derogatory way possible - "ugly historical baggage" ? sure, show me a better designed language, show me the baggage
“Hate speech” is usually reserved for speech involving people… can’t tell if it’s sarcasm.

I use python, I don’t love it. Don’t really hate it either. You use it because it solves a problem or has a library that makes solving problems easy.

It’s ok for people to have different opinions about what languages they like.

There is a video where someone asked for people to submit python scripts to control his Christmas lights. It was fun but slightly annoying because over half the programs wouldn’t run ( missing libraries/ tab space indenting mis match). He said we would but he tried to install one of the packages on the fly. It installed, he got the same missing package error on rerun. Sort of matched my experience using python trying to get others peoples code to run.

> I don't actually like Python. [...] I find the syntax ugly (format strings

Format strings being the first supporting reason for not liking a language is so funny to me.

Agreed that this is one of the worse reasons to dislike it. Format strings are pretty decent, especially for casual printf debugging, even if they are crippled compared to what could have been (PEP 501) and is hardly ideal for generating arbitrary-grammar languages.
You might be describing Javascript. Which is far more ubiquitous thna python, and a 100 times the design issue.
I also consider these two languages to be on a similar level.
i beg to differ. IMO Python is slowly becoming - or already became - the new Java - and is being used as such. i am programming with it for 25y, and it still allows things to be as simple as they were long time ago (attribute access is single well-defined thing, which means: simple), but overall mass use is not simple anymore..
Actually, Go is the new Java:

- garbage-collected

- opinionated design meant for easy adoption by inexperienced coders

- static type system that is primitive to the point of being stifling

- dearth of abstract, generic language constructs

- lots of boilerplate, especially around error handling

- heavy reliance on code generation

One thing I was waiting for the article to mention is that basic has a REPL.

I started on Atari basic in the 80s and having a REPL, even though I didn't know to call it that, was revelatory. Writing a line of code or a little for loop and drawing lines on the screen was a very tight learning experience.

Python approaches that with its REPL and notebooks but doesn't quite match the pedagogical ergonomics I enjoyed 35 years ago with that basic cartridge.

For beginners, python also has some confusing foot guns too, like understanding which objects pass by value and which by reference. It's all part of learning, but when a beginner is still trying to get a handle on variables and functions, it can confound the fundamentals.

Everything is by value.

Passing by reference means this is possible:

    def change_param(ab):
        ab = 768


    x = 12
    print(x)
    change_param(x)
    print(x)
Expected output in reference parameters, 12 followed by 768.

Otherwise it is always a value, even if the value happens to be a reference to an heap allocated object.

Python has no mechanism to change the contents of the x variable used as parameter on call site.

> like understanding which objects pass by value and which by reference

Isn't that true for almost every "mainstream" language?

I'm on a quest to find a statically typed Python with pattern matching, overloading, and friends BUT will allow me to use either PyTorch or Tensorflow (or JAX).

I think Nim is close, but every attempt to wrap PyTorch dies a miserable death somewhere along the line.

Sounds like you're looking for... Python?

It has tools for checking static types (and the language community strongly encourages their use). Pattern matching was added in version 3.10.

Have a look at Swift, it's practically that. There even used to be official TensorFlow bindings (they wanted to make it their default language) although that got cancelled.
Sounds like Mojo
QBasic is actually still a great first language for children, particularly non-native English speakers. In this case, the syntax is really easy to grasp, simple UPPERCASE commands with lowercase arguments. No need to wrestle with getting closures right, etc.

I had quite a bit of success digging QBasic with our son (10yo back then), using this great tutorial which I translated to our language: http://tedfelix.com/qbasic/

Eventually, though, the son dropped his QBasic explorations (I consider it "my fault", since I got burdened with other stuff and couldn't help him as much as I wanted to). And - he dropped it in order to first take up Scratch and then dig straight into - duh! - Python. There ya go. I do think he will need some time to get closures etc intuitively right; in this regard, QBasic was, IMO, indeed, easier to grasp.

I was happy to find a great children-friendly IDE for Python, though - Mu: https://codewith.mu/

Not as "immersive" as the excellent (!) QBasic IDE and its blue screen, but still great. No bloat. F5 for launching the program, etc - and our son started to notice and carefully analyze the interpreter's error messages from first try all by himself. So, all in all, really happy with Mu.

> One parting thought: how long will Python's reign last?

Python doesn't really target non-programmers (IIRC the Steering Council is composed entirely of professional developers, who steer the language towards fulfilling their own needs).

Therefore I expect Python's reign as a language for non-programmers will be ended by a language that targets that audience specifically.

But what might such a language look like? For example, I imagine it will unashamedly dynamically-typed, or maybe have a simple (Go-like?) static type system - rather than the complexity of Python's Mypy/Pytype/Pyright/Pyre.

Counterpoint: Python is tempting to non-programmers, because it is heavily used in industry and there are libraries for everything. A language designed for non-programmers won't have thousands of useful libraries and blog posts about every topic possible.

Maybe the "non-programmer friendly" language could add some kind of FFI to use libraries from another language, but then someone who wants to use it needs to understand caveats of two languages, not just one.

And mypy/pyright etc is not that bad imo - Python is fully dynamically typed, mypy just tries to help when it "knows" something is wrong, but user may ignore it. But I don't know, I've used python for so long that I may be blind to it's caveats.

> But what might such a language look like? For example, I imagine it will unashamedly dynamically-typed, or maybe have a simple (Go-like?) static type system - rather than the complexity of Python's Mypy/Pytype/Pyright/Pyre.

non-programmers using the language will almost certainly not use type hints.

I suspect most Python code out there does not.

https://log.schemescape.com/posts/programming-languages/comp...

"A good way to discourage me from testing out your software is to require a gigabyte (or more) download (and no, providing an installer that obscures the massive download is not a solution).

The chief offender of inexplicably enormous downloads is, unfortunately, anything related to compiling software for Windows. Want to use the free edition of Microsoft Visual C? That will be at least 3 GB. How about a more modern language like C#? That's 5 GB. Even non-Visual Studio C/C++ compilers tend to be hundreds of megabytes."

The Microsoft practice of burying relatively small executables and libraries inside mega- and now giga- sized downloads dates back to at least the early 90s.

.NET SDK: 235 MB for Windows x64 + whatever space VS Code and base C# or F# (Ionide) extensions take. Visual Studio is optional.
Another way in which Python is the new BASIC is that it's preinstalled on the vast majority of Linux systems that have a terminal. Once it passed that threshold its popularity for utilities and scripts is a self-fulfilling prophecy.

It's common that I'd prefer Ruby but pick Python because it can be expected to run out of the box pretty much anywhere as long as you're conservative with syntax and dependencies (and have automated compat tests).

Its only real interpreted competitors there are Bash, POSIX shell, and Perl, I think.

Unfortunately, while this is a fine way to start experimenting with Python, the Linux system installation of Python is really not suitable for development in general, aside from developing software meant for your local use as part of the system.

In particular, if you're based on Debian, the system Python likely lacks several pieces by default that the Python team considers standard: `venv` (https://software.codidact.com/posts/291789) and `tkinter` (https://software.codidact.com/posts/291791) standard libraries, and Pip (not part of the standard library, but has privileged status - https://software.codidact.com/posts/291787). You'll also run into problems (especially with Python 3.11 onward - https://software.codidact.com/posts/291839) trying to install third-party libraries without making a separate environment first (which you should do anyway).

People really underestimate just how important this property can be for a scripting language. It's happened multiple times in my career that, due to regulatory burdens, we aren't allowed to install anything new on a given machine without going through due process - in those situations, you gotta be able to work with what you got.

Unsurprisingly, Python is the language I have the most experience with by far, followed by Bash and PowerShell if you count those. All because they're actually accessible from the getgo on the system.

> Another way in which Python is the new BASIC is that it's preinstalled on the vast majority of Linux systems that have a terminal

Pyrhon 2 or Python 3 ? /s

https://log.schemescape.com/posts/programming-languages/futu...

"Future-proof programming languages, part 3

March 3, 2023

SDK size (measured on x86_64 Alpine Linux), as a proxy for simplicity

Just looking at SDK size, Rust is an outlier. Even compared to a similarly complex language like C++, the Rust SDK is absolutely huge.

Even after allowing for a build tool, custom linker, and standard library, the Rust SDK is disappointingly heavy.

The other languages show some interesting results: JavaScript and C# appear to be the most bloated, closely followed by SBCL (a Common Lisp implementation).

If I'm just looking for a simple and fast language, that would leave C, Go, and Zig.

C is almost certainly future-proof for another decade or two and the SDK is reasonably sized.

I don't like Python."

Would have been great if the author reached out to community about .NET first instead of posting content that they did.

Anyway

  # JIT-based build
  dotnet publish -o {folder} -r linux-musl-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true

  # Native binary build
  dotnet publish -o {folder} -r linux-musl-arm64 -p:PublishAot=true
Can build on the RPI too: https://learn.microsoft.com/en-us/dotnet/core/install/linux-...

I guess it's too challenging to browse the docs...

In the last week I have been working with python, JavaScript and C++. Not sure any of them would win a beauty contest.
Agreed. Whilst we should aspire to language beauty, it's usually trumped by practicality. Python is massively practical:

- the easy on-ramp (often reads like English, indentation is something beginners can innately pick up)

- batteries included: with the rise in the internet+ the shift to packages, it's really about having enough places you can find workable solutions, and Python's dominance helps here

- integration with other languages has been a key part of Python since the beginning, so you are rarely held back

I guess it depends on the field you're working in. When manipulating strings, await db calls, sort arrays, JavaScript (TypeScript actually) feels very intuitive and concise. But going more low level I can see it breaking apart.
JavaScript is a better Python than Python. But then, Lua is a better JavaScript than JavaScript.
Is the brick more important than the building? each level of abstraction has its use case and its advantages (and disadvantages). Better not to criticize the level of abstraction but to try to improve it. Even from the bottom with better bricks if possible.
>BASIC was designed to be usable by anyone--not just experienced programmers. Python is the new BASIC

It does largely fulfill that but there's more! Python is used for a lot of serious stuff in a way that BASIC never really was. ChatGPT is written in Python, the most popular language used by scientists is Python, the CERN accelerator is controlled by Python and so on.

It often seems to function as a bit of a user interface to control more serious code written in C, C++, CUDA or whatever.

I think it’s parallel's to basic is that it’s not commonly used for a gui interface the way basic always never made that jump in a universal way unless you bought the Microsoft product.

But to be fair basically everything can be installed easily and is everywhere these days. Python isn’t everywhere and has to be installed on a Mac or a pc and doesn’t come with it. You could say the same of node or go or anything else that can be installed with a few clicks.

BASIC experience:

1) Turn computer on

2) Wait 2 seconds

3) Start programming

Python is not BASIC.

1) Turn on computer

2) open your preferred CLI/shell, type "python"

3) start programming

in that view, micropython on an esp32 could fit
I don't recall BASIC having a dozen different package management ecosystems...