this post was submitted on 26 Feb 2025
56 points (100.0% liked)

Technology

67050 readers
7003 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 33 points 3 weeks ago (1 children)

Please please please can we just use type safe languages.

[–] [email protected] 5 points 3 weeks ago (1 children)

Agreed. Just the idea of finally replacing JS with something only to be another of those "dynamic" languages makes me want to puke.

[–] [email protected] 3 points 3 weeks ago (2 children)

Asking genuinely as someone who knows not much about this subject, is typescript not already an option? Isn’t it just type safe js that gets interpreted as js?

[–] [email protected] 10 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

Typescript doesn't run in browser. It gets translated to js by some build steps. I would also say it's only mostly type safe. You can kind of trick the system if you don't know what you're doing or don't like your coworkers.

[–] [email protected] 2 points 3 weeks ago

No, you can't if there's any semblance of a PR review process. Reject until it's type safe.

[–] [email protected] 2 points 3 weeks ago (1 children)

Yes, it is and it's great. 😎

[–] [email protected] 2 points 3 weeks ago (1 children)

It's alright. I work with it every day and constantly wish it had RTTI

[–] [email protected] 8 points 3 weeks ago

This isn't about replacing javascript, this compiles something that looks a bit like Python to C and then to WASM. Which browsers can run natively these days. But you can do that with any source language if there's a compiler for it, type safe or not. You can compile Rust to WASM too for example. So nothing's getting replaced, these are just additional tools for Web developers.

[–] [email protected] 3 points 3 weeks ago (1 children)

I think if the idea is to replace js, it should be a superset language at the interpreter level. I.e. the interpreter can run js, but valid js wouldn't work with the compiler. It makes it a drop-in replacement without harming legacy

[–] [email protected] 5 points 3 weeks ago

WebAssembly is the target, not js, I believe.

[–] [email protected] 1 points 3 weeks ago

Very interesting.