[m-users.] Inst problem
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sun Nov 2 16:25:45 AEDT 2025
On Sun, 2 Nov 2025 14:15:25 +1100, Julien Fischer <jfischer at opturion.com> wrote:
> As with many uses of inst-subtying of this kind, the question has to
> be asked: what benefit
> do you expect this to have?
The benefit is that you don't have to have code to handle situations
that you know should not happen. The problem is ...
> (At least so far as users of your module
> are concerned, it has
> the downside of making mode errors more complicated.)
... this downside, which is inherent in using the mode system to do the job.
Using Mark's suggested representation, you can achieve the same end
through subtypes. And because the type checker has a significantly
simpler job than the mode checker, any diagnostics you get should be
significantly less complicated.
Zoltan.
More information about the users
mailing list