JoshOrndorff / librho

A Standard Library for Rholang
Apache License 2.0
12 stars 6 forks source link

Included error messages #3

Closed Eknir closed 5 years ago

Eknir commented 5 years ago
JoshOrndorff commented 5 years ago

This is definitely a good idea. What do you think about the paradigm of passing in two channels like

new return, error in {
  abs!(5, *return, *error)
}

Then you get something back on exactly one of the error and return channels. Kind of like javascript promises.

Eknir commented 5 years ago

What about this @JoshOrndorff ?

JoshOrndorff commented 5 years ago

Looking pretty good. I'm just not seeing why inputChecker was necessary. What if we

contarct abs(@input, return error) = {
  match input {
    inp /\ Int => whatever
    _ => whatever
  }
}
JoshOrndorff commented 5 years ago

btw, I'm having fun exploring this and learning with you. If revising becomes a pain I'll happily merge.

Eknir commented 5 years ago

I like it too. If you are patient, I'll definitely propose a revision.

On Thu, 4 Oct 2018, 19:52 Joshy Orndorff, notifications@github.com wrote:

btw, I'm having fun exploring this and learning with you. If revising becomes a pain I'll happily merge.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JoshOrndorff/librho/pull/3#issuecomment-427111102, or mute the thread https://github.com/notifications/unsubscribe-auth/AfeL-elXkrt3SMk6RF3tqH0BXT_pDMMdks5uhkrUgaJpZM4XH6ey .