On Mon, Mar 21, 2016 at 08:37:57AM -0700, Brian Adkins wrote:
> On Monday, March 21, 2016 at 11:19:18 AM UTC-4, Neil Van Dyke wrote:
> > I propose that it's time for `#lang racket/base` to have a `define/provide`.
> > 
> > (Out of all the possible combinations of definition forms and other 
> > things we might often want to do with the defined identifier(s) at the 
> > same time, the pair of `define` and `provide` together is overwhelmingly 
> > the most common in my code.  It might even be the normal case for me 
> > that `define` is usually paired with a `provide`.  Years ago, I moved to 
> > putting `provide` right before the `define`, which was a win in a few 
> > ways, but I always feel dumb typing "(provide foo)\n(define (foo ".  I 
> > haven't wanted to make a special package dependency or new `#lang` for 
> > `define/provide`; I think `define/provide` belongs in `racket/base` now.)
> > 
> > Neil V.
> 
> As I mentioned in my original post, I wasn't suggesting we emulate the Elixir 
> behavior - I was really just curious about macro limitations :) 
> 
> `define/provide` seems a bit long to me. I also like the distinction 
between defining  a function with define and indicating export 
behavior with provide.

Separating the two has the advantage that you can collect thhe provides 
together and  see them all in one place.  For some styles of usage, 
this may be a disadvantage.

-- hendrik

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to