Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Mixing reproducible and non-reproducible code



On 2012-12-06 14:59:30 +0000, N.M. Maclaren wrote:
> We are still clearly at cross-purposes.  The situation is that 1788 (and,
> in particular, this section) has the following properties:
> 
>    a) 1788 imposes constraints on the language definition - it does
> not and cannot impose constraints on implementations

Not really. If a language doesn't satisfy some constraint, this would
become a constraint on the implementation (which could be regarded as
a new language). For instance, consider a language that doesn't have
an interval type and where the user can't create new datatypes, but
an implementation could provide additional datatypes as an extension
(I think that XSLT + EXSLT is quite close to this idea).

>    b) The language definition imposes constraints on implementations
>    c) The implementations impose constraints on programs

I agree.

> In all cases, reproducibility MUST be optional, in the following sense:
> 
>    a) 1788 must not require the language to have a reproducible mode,
> though it may require a specific set of reproducible operations, specified
> as some sort of library procedures
> 
>    b) The language must not be required to require implementations to
> support a reproducibility mode, even if it specifies one - if it chooses
> to do so, that is OK
> 
>    c) The program must not be required to use reproducibility, even if
> the implementation supports it

I agree on these 3 points, except that I don't understand "though it
may require a specific set of reproducible operations..." (what does
"it" refer to?).

> >If a language standard doesn't have anything about reproducibility,
> >it isn't major a problem. Implementations can still provide
> >reproducibility as an option.
> 
> They cannot provide it across implementations, and my point was and is
> that P1788 talks about reproducibility in absolute terms.

Well, implementations may be based on different number formats
and interval types, so forget reproducibility across two random
implementations, even if the language provides reproducibility
features.

> >>Making it mandatory as an option is a sure way of getting 1788
> >>rejected or grossly abused by most of the important ones.
> >
> >I wonder what you mean by "mandatory as an option". There should be
> >nothing mandatory for the implementer and for the user.
> 
> Requiring language standards to specify it as something an implementor
> may choose to support. [...]

I agree with you. Language standards do not have to mention
reproducibility at all.

> >But reproducibility can be specified as an option, and if an
> >implementation claims to support it (e.g. via a special mode),
> >then it shall not lie. That's all.
> 
> If, by "can be", you mean "may be, at the choice of the language
> definition", then I agree.  Otherwise, I strongly disagree.

I meant that reproducibility can be specified as an option by P1788
(a P1788 implementation is not required to provide such a mode).

With reproducibility or not, P1788 may not be implementable in all
languages. So, there's some choice to be made by the user at the
language level (see my first paragraph above).

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)