Re: [racket-dev] Proposal for a no-argument

2012-07-19 Thread D Herring
On 07/01/2012 09:27 AM, Eli Barzilay wrote: There rare cases where it is useful to have a value that means that no argument was passed to a function. In many of these cases there is a plain value that is used as that mark, with the most idiomatic one being #f, but sometimes others are used.

Re: [racket-dev] Proposal for a no-argument

2012-07-11 Thread Vincent St-Amour
At Sun, 8 Jul 2012 08:40:41 -0400, Eli Barzilay wrote: Quick summary: I'll remove the #:before-first and #:after-last feature. If anyone wants them, please tell me -- maybe it can be left for the spliced case, or maybe they could always be spliced. +2 to always splicing. This gives us the

Re: [racket-dev] Proposal for a no-argument

2012-07-08 Thread Eli Barzilay
Quick summary: I'll remove the #:before-first and #:after-last feature. If anyone wants them, please tell me -- maybe it can be left for the spliced case, or maybe they could always be spliced. On Monday, Matthew Flatt wrote: I'm not enthusiastic about this proposal. As you say at the

Re: [racket-dev] Proposal for a no-argument

2012-07-03 Thread Matthias Felleisen
1. The need for a no-value initial value shows up only when we have a function with two (or more) such parameters. Otherwise case-lambda does fine. 2. Eli's initial proposal triggered the same response in me as Robby's except that our experience with 'undefined' immediately told me I want to

Re: [racket-dev] Proposal for a no-argument

2012-07-02 Thread Vincent St-Amour
I really like this. Vincent At Sun, 1 Jul 2012 09:27:00 -0400, Eli Barzilay wrote: There rare cases where it is useful to have a value that means that no argument was passed to a function. In many of these cases there is a plain value that is used as that mark, with the most idiomatic

Re: [racket-dev] Proposal for a no-argument

2012-07-02 Thread Asumu Takikawa
On 2012-07-01 09:27:00 -0400, Eli Barzilay wrote: A more robust way to do that, which has become idiomatic in Racket is to use (gensym). (And as a sidenote, in other implementations there are various similar eq-based hacks.) IMO, this is an attempt to improve on the #f case by guaranteeing a

Re: [racket-dev] Proposal for a no-argument

2012-07-02 Thread Matthew Flatt
I'm not enthusiastic about this proposal. As you say at the start, it seems like a rare case. My main objection is that it's too rare to merit a change to the main `lambda' form and other parts of our infrastructure, such as documentation tools. As a weaker objection, I don't agree with the

Re: [racket-dev] Proposal for a no-argument

2012-07-02 Thread Matthew Flatt
At Mon, 2 Jul 2012 12:14:02 -0400, Asumu Takikawa wrote: The gensym thing is used in parts of the GUI code for initialization arguments, e.g.: (class* mred% (area%) (init mk-wx get-wx-pan get-outer-wx-pan mismatches prnt [min-width no-val] [min-height no-val]

Re: [racket-dev] Proposal for a no-argument

2012-07-02 Thread Jos Koot
May be the discussion goes beyond my understanding, in which case sorry for my noise. Where I need a value distinct from all other values (such as a no-value), I prepare an empty struct type and export one single instance of this struct together with its predicate (and nothing else) Jos

[racket-dev] Proposal for a no-argument

2012-07-01 Thread Eli Barzilay
There rare cases where it is useful to have a value that means that no argument was passed to a function. In many of these cases there is a plain value that is used as that mark, with the most idiomatic one being #f, but sometimes others are used. IMO, while such uses of #f are idiomatic,

Re: [racket-dev] Proposal for a no-argument

2012-07-01 Thread Robby Findler
If you're only going to use in keyword arguments (and optional arguments), you could make it an error to touch the value, unless it gets touched by a special predicate that checks for its existence. That is, in (define (f #:x [x]) ...) (where I'm saying that leaving off the default value means

Re: [racket-dev] Proposal for a no-argument

2012-07-01 Thread Eli Barzilay
Just now, Robby Findler wrote: If you're only going to use in keyword arguments (and optional arguments), you could make it an error to touch the value, unless it gets touched by a special predicate that checks for its existence. That is, in (define (f #:x [x]) ...) (where I'm saying