[m-rev.] for post-commit review: centralize decisions about mutables' aux preds

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Sep 2 11:59:56 AEST 2019



On Mon, 2 Sep 2019 11:52:13 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:

> > +    % The first group represent the public predicates, the predicates
> > +    % that user programs may call. The usual (non-constant) kind of mutable
> > +    % will have the standard get and set predicates, and if attached
> > +    % to the I/O state, will have the I/O get and set predicates as well.
> > +    % Constant mutables will have the constant get and set predicates instead
> > +    % (see below).
> > +    %
> > +    % The first group represent the private predicates, the predicates
> 
> s/first/second/ there.

Done.

> > +    % that user programs should not call (and which are not documented).
> > +    % The unsafe get and set predicates may be needed to implement the other,
> 
> s/may/are/

Actually, we do NOT need the unsafe get and set predicates when targeting erlang,
and/or when the mutable is a constant.

> > @@ -150,14 +150,20 @@
> >      % containing only `X', i.e.  if `Set' is the set which contains
> >      % all the elements of `Set0' except `X'.
> >      %
> > +    % The det_remove version aborts if the removal fails.
> 
> We generally don't describe library predicates as aborting anymore.
> For one thing it's ambiguous: does it throw an exception or do something
> else (e.g. call MR_fatal_error)?
> 
> I would reword that as as:
> 
>      The det_version throws an exception instaed of failing.

Done, in both places.
 
> The rest looks fine.

Thank you.

Zoltan.


More information about the reviews mailing list