101 points

1998 called, it wants its java applets back

permalink
report
reply
22 points

If it’s WASM it’s here to stay.

permalink
report
parent
reply
11 points

Did someone get Java applets working on WASM? Who is this maniac?

permalink
report
parent
reply
7 points

Java applets idk, but we do have Flash

permalink
report
parent
reply
83 points

You can already do this with the power of webassembly.

permalink
report
reply
79 points

Look up WebAssembly.

permalink
report
reply
43 points

As a python developer and user of websites, please no. The web is already a slow mess and my laptop is already spinning up fans on some websites that really shouldn’t do anything much more complicated than load text and images from a database and display them. CPython would make it exponentially worse. At least pick a sensible performance focused implementation.

permalink
report
reply
0 points

it’s cpython much slower than JS?

permalink
report
parent
reply
41 points
*

Yes. Please. Although something strongly typed would be even better. It’s ridiculous the world runs on a language built in 2 weeks.

permalink
report
reply
40 points

It’s also ridiculous to think it’s still the same language that was built in two weeks, like absolutely no work was done in it over time.

permalink
report
parent
reply
-10 points
*

I’ll admit I don’t really know the history of the language between then and now. Please don’t tell me the crazy stuff was somehow added later.

permalink
report
parent
reply
3 points

If you don’t know the history, why are you so confidently talking about JavaScript being built in 2 weeks?

permalink
report
parent
reply
3 points

It’s gotten better. Still some weird stuff but it has cool stuff too now.

permalink
report
parent
reply
27 points

Python is strongly typed, but it is also dynamically typed.

permalink
report
parent
reply
9 points

TIL. Obviously I’ve avoided using it much.

So how does that work? Is there a few implicit conversions that are allowed, but if you really write something weird it will complain?

permalink
report
parent
reply
11 points

Yes, it has no implicit conversions like JS or R. It does, however, allow you to not specify the type of a variable and even change it without complaining. Even if you add types these are only hints that won’t generate errors unless you use external type checking (e.g. mypy).

permalink
report
parent
reply
6 points

In python you always have the right type, cause everything is an object

permalink
report
parent
reply
26 points

And yet somehow it evolved to become something that will last to the heat death of the universe.

I’ve grown used to it with time, though. Once you know it’s “quirks”, it’s not so bad.

permalink
report
parent
reply
4 points

I guess the internet just grew that fast. The first arrival took all and locked everybody in.

Now, we have just two browsers that are widely used, so maybe we do have an opportunity to go back and fix it. Go sounds like it’s a pretty popular choice for statically typed, imperative high-level language.

permalink
report
parent
reply
16 points

Honestly, given the context of a browser, Javascript’s “Everything is better than crashing” philosophy does not seem too out-of-place. Yes, the website might break, but at least it would be theoretically usable still.

Yes, a statically typed language would help, but I’d rather not have one that is “these two types are slightly different, fuck you, have a segfault”, but rather one that is slightly more flexible.

permalink
report
parent
reply
2 points

Not even “not so bad”, I would say that as a scripting language it’s fantastic. If I’m writing any actually complex code, then static typing is much easier to work with, but if you want to hack together some stuff, python is great.

It also interfaces extremely easily with C++ through pybind11, so for most of what I do, I end up writing the major code base in C++ and a lightweight wrapper in Python, because then you don’t have to think about anything when using the lib, just hack away in dynamically typed Python, and let your compiled C++ do the heavy lifting.

permalink
report
parent
reply
25 points

Python is actually mostly strongly typed. Strongly (e.g. can’t use a number as a string without explicitly converting it), but dynamically (can change type of variable at runtime). You probably would prefer a statically typed language and I agree.

permalink
report
parent
reply
1 point
*

Alright, thanks for the help with terminology. I’m a bit confused about changing types at runtime. I thought a compiled or interpreted language stopped having types at runtime, because at that point it’s all in assembly. (In this case of course it’s scripting, which someone pointed out to me elsewhere)

permalink
report
parent
reply
3 points

That’s a compiled language, an interpreted language is translated to assembly at runtime, in pythons case: pretty much one line at a time.

Disclaimer: To the best of my knowledge, please correct me where I’m wrong.

permalink
report
parent
reply
5 points

Typescript!

permalink
report
parent
reply
12 points

permalink
report
parent
reply

[This comment has been deleted by an automated system]

permalink
report
parent
reply
2 points

Couldn’t agree more.

permalink
report
parent
reply
4 points
*
Deleted by creator
permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5K

    Monthly active users

  • 1.5K

    Posts

  • 33K

    Comments