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

Rename try and try.raise as e.g., exception and exception.cause. #3356

Open
fridis opened this issue Jul 10, 2024 · 1 comment
Open

Rename try and try.raise as e.g., exception and exception.cause. #3356

fridis opened this issue Jul 10, 2024 · 1 comment
Assignees
Labels
base library related to the Fuzion base library enhancement New feature or request

Comments

@fridis
Copy link
Member

fridis commented Jul 10, 2024

It might be confusing to have try and eff.fallible.try. Also try.raise and eff.fallible.cause are potentially confusing. Currently, code looks like this:

  (try reader)
    .try
        ...
      if !read_ok then (try reader).env.raise e 
        ...
    .catch e->
      handle error e

It might be better to use different names, e.g., exception and cause

  (exception reader)
    .try
        ...
      if !read_ok then (exception reader).env.cause e 
        ...
    .catch e->
      handle error e

Any other suggestions for names?

@michaellilltokiwa
Copy link
Member

Only arguably worse names come to mind abortable.env.abort, interruptable.env.interupt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base library related to the Fuzion base library enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants