Here's what Jay is trying to say: 

Welcome to Racket v6.1.1.6.

This works: 

> (define (none) (values))
> (let-values ([() (none)]) 42)
42

This doesn't: 

> (let-values ([(x) (none)]) 21)
result arity mismatch;
 expected number of values not received
  expected: 1
  received: 0
  values...:
  context...:
   /Users/matthias/plt/racket/collects/racket/private/misc.rkt:87:7

[No, return arity mismatch isn't a particularly explanatory error message.]

-- Matthias



On Jan 6, 2015, at 6:56 AM, Jay McCarthy wrote:

> They CAN return no values: (values)
> 
> It is just awkward because you get an error in the binding forms if you try 
> to name the result (because there is none.)
> 
> Jay
> 
> On Monday, January 5, 2015, Jack Firth <[email protected]> wrote:
> Given that racket has multiple return values, what sort of issues would arise 
> if functions were allowed to return no values at all instead of opting to 
> return the single value void when they have nothing to return? Is it purely a 
> backwards compatibility thing, or are there more fundamental problems with 
> that?
> 
> On Mon, Jan 5, 2015 at 4:46 PM, Hendrik Boom <[email protected]> wrote:
> On Mon, Jan 05, 2015 at 05:58:31PM -0500, Sean Kanaley wrote:
> > I see "void" as a tangible value specifying no information, whereas
> > "undefined" is literally no information. So void is more like an empty
> > universe and undefined is no universe at all.
> 
> Algol 68 had a void value, called 'empty' in the defining report, but
> it didn't need a name in the language itself, because there were too
> many easy ways of geerating it.
> 
> I always considered void to be a type with exactly one value, which
> would need log2(1) bits to reprresent it, i.e., zero.
> 
> The report also left a number of things undefined.  An early draft of
> the report went on to specify 'undefined' as meaning anything from a
> reasonable continuation of the computation to 'indescribable chaos'.
> 
> -- hendrik
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
> 
> 
> 
> -- 
> Jay McCarthy
> http://jeapostrophe.github.io
> 
>            "Wherefore, be not weary in well-doing,
>       for ye are laying the foundation of a great work.
> And out of small things proceedeth that which is great."
>                           - D&C 64:33
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to