mun-lang / mun

Source code for the Mun language and runtime.
https://mun-lang.org
Other
1.85k stars 73 forks source link

What is the take on error handling, multithreading, etc.. #308

Open codec-abc opened 3 years ago

codec-abc commented 3 years ago

Hi,

Interesting project you got there.

I, for one, looking for a language that would be a bit like Rust but at a higher level. In other way, I am looking for a language that has no null, explicit error handling (aka no exceptions), and a nice multi-threading story (maybe something like an actor model, at least something that avoid to shoot you in the feet). Bonus point if it can interoperate with Rust easily :)

So, what are the takes of Mun on nullability, error-handling and parallel and async computations?

Wodann commented 3 years ago

We aren't sure about the multi-threading story yet

dumblob commented 3 years ago

We aren't sure about the multi-threading story yet

For an overview of potential goals, you can check my summary post https://github.com/vlang/v/issues/1868 .

Wodann commented 3 years ago

Thanks for the inspiration, @dumblob. I might be interpreting incorrectly (or adding my own thoughts), but I like the idea of task-based parallellisation. It allows us control over hot reloading of changed tasks, while unchanged tasks can keep running.

A data-driven approach might even allow for restarting of a task, if the task contains its initial state.

codec-abc commented 3 years ago

Thanks for taking time to answer me. While we are at it, do you mind elaborating on functional programming and mutability. Looking at the pong example, it seems Mun is pretty standard here, with everything being mutable unless explicitly tell otherwise?

As a side note, feel free to close the issue whenever you want because I know some maintainers wants to keep their issues tidy and this isn't really an issue but rather a discussion.

Wodann commented 3 years ago

We went for simplicity on our initial implementation of variables and parameters, but are adding "immutable by default": #305

W.r.t. closing, I missclicked "comment" and hit "close with comment by accident"