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

Re: P1788: Motion 44 NO votes



Le 05/06/2013 01:19, John Pryce a écrit :

Moreover, I understand "returns no value" as meaning that it does not return at all, which basically requires that it either throws or never terminates.
My view has been that at Level 1 a function, given inputs outside its domain, "has no value". E.g. real square root of -1, or 0/0, or text2interval("I'm garbage") have no value at Level 1. This matches the standard set-theory definition of a function. At Level 1 the questions "does it return?" or "does it never terminate" are meaningless. This has been discussed but maybe is not clearly enough stated in the Level 1 text.

The vocabulary had me really confused; with such an interpretation however, I am fine. (I wasn't really worried in the first place about what the spirit of the text was, but since it was a vote about actual standard text and there was no chance for it to fail at that time, I preferred to vote against.)

As you say, in a setting of partial functions, the question "does it return?" is meaningless. But then I would suggest to ban expressions such as "return something", "return no value", "succeed", "fail", as it leads to think the contrary. For future texts, I would suggest to systematically replace "succeeds" by "is defined", "returns something" by "is defined and has value something", and "fails" and "returns nothing" by "is not defined", at level 1. And then say at level 2 that functions outside their "definition domain" do something (be it a failure, or returning NaN or NaI, or a specified value).

Best regards,

Guillaume