tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
47 stars 11 forks source link

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

Open fridis opened 3 months ago

fridis commented 3 months ago

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 commented 3 months ago

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