Another attempt at this old thing -- the idea of having some internal
`#%begin' thing (see ancient context below):
`begin' is something that is not only a ";" because of how it
sequences things, it's also a "return" thing -- it can be read as
(begin x ... y) ~ { x; ...; return y; }. So maybe a `#
On Wed, Oct 13, 2010 at 7:08 AM, Carl Eastlund wrote:
> In the case I have, though, I want the sequence to be empty. The
> problem is that these bodies -- (let () ...), (parameterize () ...),
> etc. -- are used for a lot of different things. A macro may splice in
> a sequence that is intended to
In the case I have, though, I want the sequence to be empty. The
problem is that these bodies -- (let () ...), (parameterize () ...),
etc. -- are used for a lot of different things. A macro may splice in
a sequence that is intended to represent definitions to bind in a
scope, expressions to evalu
In a sense you just want to change the 'fault blame' designation when
e/d ...
moves from macro foo to macro bar so that bar isn't blamed. It is then
foo's job to ensure that the sequence isn't empty and foo is blamed when
things go wrong.
I suspect this can be solved in syntax-parse, too.
At Wed, 13 Oct 2010 08:23:09 -0400, Carl Eastlund wrote:
> On Wed, Jul 7, 2010 at 12:23 PM, Matthew Flatt wrote:
> > Should an expression be required at the end? A `module', `unit', or
> > `class' body can consist of just definitions. Similarly, if an
> > internal-definition context ends with a de
On Wed, Jul 7, 2010 at 12:23 PM, Matthew Flatt wrote:
> Should an expression be required at the end? A `module', `unit', or
> `class' body can consist of just definitions. Similarly, if an
> internal-definition context ends with a definition, we could define the
> result to be `(void)', which is w
On Jul 8, Matthias Felleisen wrote:
> On Jul 8, 2010, at 12:09 PM, Jay McCarthy wrote:
>
> > #%module-begin as the top level controlling macro is a distinguishing
> > feature. Requires and provides can only be there and you know there's
> > only one application.
>
> These could be an argument to
On Jul 8, Matthias Felleisen wrote:
>
> 2. I do not understand why #%body isn't enough. Couldn't #%body
>locally expand to the point where defs and exps are
>distinguished?
Yes, it could -- and I guess that would be in analogy to
`#%module-begin'. But I generally don't like that macros
On Jul 8, 2010, at 12:09 PM, Jay McCarthy wrote:
> #%module-begin as the top level controlling macro is a distinguishing
> feature. Requires and provides can only be there and you know there's
> only one application.
These could be an argument to the #%...-begin macro:
are-you-top-level? :: (
On Thu, Jul 8, 2010 at 11:19 AM, Matthias Felleisen
wrote:
>
> On Jul 7, 2010, at 5:55 PM, Eli Barzilay wrote:
>
>> Some examples that show how useful this is:
>>
>> * In the lazy language you want the implicit begin to force all
>> expressions except for the last one.
>>
>> * I've redefined
On Jul 7, 2010, at 5:55 PM, Eli Barzilay wrote:
> Some examples that show how useful this is:
>
> * In the lazy language you want the implicit begin to force all
>expressions except for the last one.
>
> * I've redefined the implicit begin (in an ugly way) for my course
>language to f
On Jul 7, Matthew Flatt wrote:
> Short version:
>
> I'm planning to change internal-definition expansion (anywhere that
> says `body ...' in the Racket documentation) to allow expressions to
> mingle with definitions. For example,
> [...]
Nice!
On Jul 7, Matthias Felleisen wrote:
>
> 4. I am
At Wed, 7 Jul 2010 13:13:31 -0400, Matthias Felleisen wrote:
>
> 1. My most important concern is that begin-with-definitions takes Nx times
> more time to expand than the current body expander. Are you going to use this
> macro or are you going to bake it all into the implementation?
The latte
1. My most important concern is that begin-with-definitions takes Nx times more
time to expand than the current body expander. Are you going to use this macro
or are you going to bake it all into the implementation?
2. My second one is one of internal interest. In principle all 'body' forms
s
Yeah!
(And I think you're right about not having an implicit #%body, but I
don't really know for sure.)
Robby
On Wed, Jul 7, 2010 at 11:23 AM, Matthew Flatt wrote:
> Short version:
>
> I'm planning to change internal-definition expansion (anywhere that
> says `body ...' in the Racket documentat
Short version:
I'm planning to change internal-definition expansion (anywhere that
says `body ...' in the Racket documentation) to allow expressions to
mingle with definitions. For example,
(let ()
(define (f) x)
(displayln f)
(define x 1)
(list f x))
would be allowed; the `dis
16 matches
Mail list logo