15 points

sorry js fans, but python is what an interpreted highlevel language should be

permalink
report
reply
19 points

Were just waiting on WASM to be able to access the DOM APIs directly, and then all languages will be first class citizens on the web, and then RIP JavaScript.

permalink
report
reply
4 points

Is that even a stated goal? I swear we’ve been waiting for that to exist for the better part of a decade. It would solve so many issues and comes up in every discussion about Javascript, yet the powers that be seem to have zero interest in pushing this forward.

permalink
report
parent
reply
3 points

Delphi will be back, baby.

permalink
report
parent
reply
1 point

I don’t think so - Javascript doesn’t have to ship its language runtime so it will always have a size advantage.

permalink
report
parent
reply
2 points

You don’t need a language runtime if your program has no runtime, right? A rust or C program is just the program, no runtime.

permalink
report
parent
reply
2 points

Well they still have runtimes, but yes they can be pretty minimal.

You’re still shipping a load of libraries that come for free with JS though, e.g. with Rust WASM string formatting and unicode support always ends up being annoyingly huge, and that’s built in to JS engines. There’s also collections (Map, Set), etc.

permalink
report
parent
reply
2 points

That would be quite an amazing era to live in ahaha ! We can the start the work as a community to match the JavaScript Ecosystem by providing high quality primitives for developers. For that to happen developer UX has to improve though :) but I think WASM definitely has some future.

However to contrast my previous thoughts, I find it pretty sad that people want to move away from JS when we got thing like Bun & Demo 2.0 hitting their prime!

We got benchmarks, cross-runtime stdlib, better registeries, type safety, enough performance, extendability (with runtime plugins & API). I think were approchaing a TS/JS paradigm that’s pretty impressive I must admit.

permalink
report
parent
reply
3 points
*

Deno looks interesting.

But Bun choosing Zig makes me think their priorities are not my priorities. As of now, you choose Zig (a not-yet-stable language) because you want to learn Zig and make a neat side-project. Those are not my priorities. Zig offers no unique advantages other than neat new syntax.

Deno chose Rust, which, like Zig, is new, but Rust has reached 1.0 and offers a unique advantage with its safety features. I’m not saying anything about the greatness of Rust here, only that Rust does offer unique advantages, and Rust could be chosen because of general priorities.

Bun chose Zig and then worked backwards and formed their priorities around Zig. Deno formed their priorities and their priorities lead them to Rust.

That’s how I feel anyway.

permalink
report
parent
reply
6 points

Python’s major pro is its simple, straightforward syntax, which excels at data handling. This has made it popular with novices of all shades […]

For first-timer coders, Python is easier to learn, understand, and adapt than many low-level programming languages […]

Is python being easy to learn actually true? I can see it being easier than low-level programming. But there’s other alternatives like C# and Java that certainly seem much better and easier to me. Especially when you consider the ecosystem around only writing code.

Plus, the Python language is a steadfast feature in the desktop Linux software landscape. It’s preinstalled on most Linux distributions, boasts extensive library support, and can be used to fashion very cool (as well as very basic) Qt, GTK, and other toolkit UIs.

It’s certainly available, and more readily available on Linux. The whole v2 v3 mess was lackluster. But I guess preinstalled is convenient, and more accessible than installable Java or whatever.

I’ve never seen JavaScript or Python popularity as evidence or correlating with actual qualities. More with a self-promoting usage. Python was being used in science, then in AI, then AI became popular. To me, it seems like a natural propagation consequence more than simplicity or features over other frameworks and languages.

permalink
report
reply
5 points
*

Is python being easy to learn actually true?

In my experience teaching C to non computer science students It should be. They struggle a lot with variable type and the strict syntax in general, tokenization , etc, but specially ; and {}. They are more visual so I think the forced identification of python helps and they can see to which block a line of code belongs and also it is easy to think one line one statement. When they forgot a semi-colon it is hard to explain that it became one logical line with the next one.

permalink
report
parent
reply

Is python being easy to learn actually true?

I’ve never found this to be true, I think that’s partially because I don’t find Python to be very fun to write in, so I don’t enjoy it very much, so I don’t learn new things about it very quickly.

permalink
report
parent
reply
65 points

Ok after reading the article this is bullshit. It’s only because they are counting JavaScript and Typescript separately.

permalink
report
reply
21 points

Typescript being that popular is great news onto itself.

permalink
report
parent
reply
5 points

We have different concept about what great news is.

Compiling to an interpreted high level language is crazy. I just refuse to believe we haven’t got a better solution to yet.

permalink
report
parent
reply
2 points

Don’t worry, they’re planning JS0 and JSSugar (IIRC) so you’re forced to compile anyway :D

permalink
report
parent
reply
5 points

As someone who works with typescript daily, you’re not wrong. It’s an extremely overcomplicated glorified linter that tries and mostly succeeds in catching basic type errors. But it also provides false confidence when you concoct something that shows no errors but doesn’t behave how you expect.

permalink
report
parent
reply
4 points

As for data science using Python, something tells me that this has to do with memory heap capacities. I’m not sure about Python’s max memory heap, but Javascript through Node.js seems to have only 512MB. I’ve been using Node.js to deal with big datasets and my most recent experimentation stumbled across the need of loading 100 million numbers to the RAM: while my PC has a fair amount of physical RAM (12GB) and a great part of it was available, it’ll simply error when filling an array. I needed an additional parameter, --max-old-space-size, so Node.js could deal with such amount of data. I didn’t try the same task with Python because I’m used to Javascript (yet I’m done some things in Python), but I wonder how much memory can Python hold until an error like “out of memory” happens, because ML models (for example, those hosted and served in HuggingFace) loads training weights with dozens of GBs

permalink
report
reply

Python

!python@programming.dev

Create post

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events
Past

November 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
  • Pythörhead: a Python library for interacting with Lemmy
  • Plemmy: a Python package for accessing the Lemmy API
  • pylemmy pylemmy enables simple access to Lemmy’s API with Python
  • mastodon.py, a Python wrapper for the Mastodon API
Feeds

Community stats

  • 803

    Monthly active users

  • 467

    Posts

  • 2.4K

    Comments