2010/5/19 David Herman <[email protected]>:
>> You're still not understanding me. My cat could write an executable 
>> implementation of the ES standard library. (Seriously, he's an amazing cat.)
>
> Hm. I was feeling silly at the time but that just came across mean. Sorry 
> about that. All I meant was that there's more to the spec than just whether 
> it's executable, and in fact being executable is sometimes exactly *not* what 
> you want.

If I understand,

we could specify Array.prototype.sort in some subset of an imperative
language which would mean that for all inputs we would specify the
state of the outputs.

In English, we specify macroscopic properties of the outputs -- the
properties that programmers can rely on -- while leaving enough slack
for implementors to experiment.

(The below is only for comparative value, not a suggestion.)
One language based specification equivalent of this might be
specifying Array.prototype.sort in something like prolog, where you
have can define predicates describing sortedness (given a good
comparator), stability, termination given misbehaving comparators,
etc.

But ES is better suited to concisely defining a sort algorithm than
defining sortedness.




> Dave
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to