Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
codec-abc opened this issue Feb 10, 2021 · 5 comments
Open

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

codec-abc opened this issue Feb 10, 2021 · 5 comments

Comments

@codec-abc
Copy link

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
Copy link
Collaborator

Wodann commented Feb 21, 2021

  • we won't support null, except functions that can check whether an extern C pointer is_null, similar to Rust.
  • we will have explicit error handling, similar to Rust
  • interop with Rust (but through C API) is our main target. Our main focus (i.e. the initial test case) is on Rust bindings, secondary focus is on the C++ bindings

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

@dumblob
Copy link

dumblob commented Feb 21, 2021

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

For an overview of potential goals, you can check my summary post vlang/v#1868 .

@Wodann
Copy link
Collaborator

Wodann commented Feb 21, 2021

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.

@Wodann Wodann closed this as completed Feb 21, 2021
@Wodann Wodann reopened this Feb 21, 2021
@codec-abc codec-abc changed the title What is the take on error handling on multithreading. What is the take on error handling, multithreading, etc.. Feb 21, 2021
@codec-abc
Copy link
Author

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
Copy link
Collaborator

Wodann commented Feb 21, 2021

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants