-
Notifications
You must be signed in to change notification settings - Fork 38
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
Expand and improve inter-contract comunication #208
Comments
What about adding a way to pattern match an specific type?
would make it so that only numbers could be pattern matched. This would add a little bit of overhead to the information stored about variables, but it would make for a more expressive inter-contract comunication (as there's no fixed way to send information). Another place where computation could get stuck is when expecting lambdas:
and for that, we could also add the If we restrict inter-contract communication to, say, only U120-cons list, how would contracts pass lambdas to each other? Isn't there value to it? Wouldn't it be more expressive if we didn't limit which kinds of terms we pass to one another? |
Of course, if the lambda term has a different arity than the contract expects, it could also get stuck.
If the arguments to this lambda term are not what you expect (ie. a number instead of a constructor) it could also get stuck.
Probably the smallest type-checker that would be useful is somekind of simply-typed-lambda type checker + ADT's, because constructors could have a specific type, and even if a function expects that an argument is a constructor, it may not be in the possible constructors that it matches. For that, we would need algebraic sum types. And of course, I know that it would add overhead to all the language. Maybe before publishing a statement (be it a |
Earlier iterations of the design — last year, even before the HVM — had a simple, inexpensive type system that solved much of it because it was a simple system with basically ADTs. But a big point of the new design with the HVM is we can now do very high-level stuff with a clear cost model, and (a) there are no clear answers to what type of system would be the Right One™; (b) even the Right One would also add a lot of complexity to the system. P.S. I see you have some actual simple type-checking in mind. As I'm not knowledgeable of type systems, I'll leave that discussion for you and Victor while I focus on finding other ways. |
Some other possibilities:
Related to #35 and #116.
cc @o-santi
The text was updated successfully, but these errors were encountered: