[m-rev.] for review: fix problems with the char module
Peter Wang
novalazy at gmail.com
Thu Sep 11 17:46:08 AEST 2014
On Thu, 11 Sep 2014 14:59:57 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
>
> On Thu, 11 Sep 2014, Peter Wang wrote:
>
> > On Wed, 10 Sep 2014 17:36:38 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> >>
> >> Mark the following as obsolete:
> >> - is_hex_digit/2
> >> - int_to_hex_char/2
> >> - int_to_digit/2
> >> - det_int_to_digit/1
> >> - det_int_to_digit/2
> >
> > It's probably the right thing to do, but the is_hex_digit and
> > int_to_hex_char deprecations will be annoying :(
>
> We can make them obsolete by comment only for now if you think the
> presence of the pragmas will be particularly annoying. I don't intend
> to actually remove any of these for at least several release.
Alright. Honestly what I'll probably do is use my own replacement
predicates for a while.
> >> +is_base_digit(Base, Digit) :-
> >> + ( ( Base < 2 ; Base > 36) ->
> >> + error("char.is_base_digit: invalid base")
> >> + ;
> >> + base_digit_to_int(Base, Digit, _Int)
> >> + ).
> >
> > Invert the condition (and elsewhere).
>
> Done. Diff follows:
That's fine.
Peter
More information about the reviews
mailing list