[records] SafeVarargs and canonical constructors

Tagir Valeev amaembo at gmail.com
Sat Dec 28 06:10:13 UTC 2019


More questions about SafeVarargs:

1. If we have a compact constructor declared, should the warning be
issued at record header or at compact constructor declaration? To
suppress the warning should I annotate a record type or compact

2. The same if explicit canonical constructor is declared.

To me, it seems logical to put SafeVarargs at record type if compact
constructor is present (because the variable arity parameter is not
explicitly written in constructor declaration). However, if explicit
canonical constructor is declared, it seems better to require
SafeVarargs at constructor declaration, rather than a record
declaration. Or place it in either place (but not at both).

What do you think?

With best regards,
Tagir Valeev.

More information about the amber-spec-experts mailing list