Closed krame505 closed 10 months ago
Not sure how I feel about #!
in particular, with that being shebang :laughing:
Sounds good overall, though the downside of punctuation is gonna be that it's hard to search for. (#
, in particular, seems to be an ungoogleable character.) Maybe good enough error messages might help?
Hmm, didn't thing about any potential confusion with shebang. But at least this shouldn't be showing up at the start of any files?
Any better ideas for shorthand for unique references?
Maybe a better char for decorated types is &
, which is used for reference types in C++. That would give &Expr
, &!Expr
, &Expr with {env}
, &!Expr with {env}
for example.
I am o-k with &
and am not a fan of #
for the reason Nathan pointed out. Can't say I love &
either, but can't think of anything better TBH.
The consensus was to use the above prefix &
and &!
notation for references. The existing Decorated
keyword can stay for now, with possibly a deprecated warning.
Abandoning this for now with #812, since we are doing away with unique references, and ordinary references will not frequently appear in production signatures.
I've been increasingly realizing that Silver's
Decorated
type syntax is much too verbose, especially with unique reference types showing up frequently in production signatures and dispatch attribute types; this is making error messages pretty hard to read.As a part of #751, I'm thinking we should change the syntax to
#Expr
forDecorated Expr
,#!Expr with {}
forDecorated! Expr with {}
, etc. Also with the #751 changes, the "real" decorated type constructor will beDec :: (Uniqueness -> InhSet -> * -> *)
, so this change would just be new syntactic sugar.This doesn't have to be a breaking change, as we can leave
Decorated
as a (deprecated?) alternative, but doing a big find/replace would be pretty easy.