Originally, I was going to use D, but its current WASM guideline is buried under a lot of Discord threads, all while people are lazy to touch the wiki. I need to test stuff with WASM (use for scripting in applications, not browsers).

Please NO RUST!!! While I see why functional programming is useful (I even use wasmtime as my WASM engine, which is developed in Rust), but is horribly counterproductive for game development, especially if it’s opt out like in Rust.

EDIT: In the meanwhile, I’ve found AssemblyScript, which seems to be good for my usecase.

You are viewing a single thread.
View all comments
29 points

Rust isn’t strictly functional? Do you mean you’d like a language with garbage collection?

permalink
report
reply
1 point
Deleted by creator
permalink
report
parent
reply
1 point

Are there benefits in not having a GC in WASM?

Also are there mainstream memory safe languages without a borrow checker? There’s some experimental ones out there.

permalink
report
parent
reply
3 points

At least a while back there was not a built-in GC on the WASM runtime side, so the GC has to be shipped with every app.

permalink
report
parent
reply
17 points

It’s not a functional language at all, even if it borrows ideas from FP languages. It’s an imperative language through and through.

permalink
report
parent
reply
-1 points

“It’s not a functional language at all even though it has lots of functional language features”

What? Rust is really quite a functional language in style, even if can easily support an imperative style too.

What exactly do you think makes something a functional language? Apart from currying I can’t think of any typical FP features it is missing.

permalink
report
parent
reply
9 points
*

Fundamentally it’s a language oriented around blocks of statements rather than composition of expressions. Additionally, it takes a different approach to the mutation problem than FP languages: where FP seeks to make most things pure and push mutation and side effects to the edges of the program, Rust uses its type system to make such mutation and side effects more sane. It’s an entirely different philosophy when it comes to programming. I don’t think either approach is necessarily better, mind you, just a different set of tradeoffs.

I’m a professional Haskell developer and am very much immersed in FP. When I read Rust code, I have to completely shift my thinking to something much more imperative. Whereas if I read, say, Ocaml, the difference is mostly syntactic. This isn’t a slight, mind you. I quite like Rust. But it’s a very different paradigm.

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.4K

    Monthly active users

  • 754

    Posts

  • 5.9K

    Comments