> > I'm also not sure if they are really 100% equivalent, since I'm
> > throwing in some extra specification of the order of evaluation.  This
> > makes it possible to play tricks like using objects that only exist at
> > compile time without requiring any special notation for it: the eager
> > algorithm guarantees that such objects are fully reduced before code
> > is compiled (or raise an error).  What would be neat is to be able to
> > keep this semantics, but use a more elegant way of formulating it as a
> > syntactic operation.  (If this doesn't make sense I'd be happy to
> > elaborate.)
> 
> Yeah, that makes sense, like a kind of abstract interpretation, you're saying?

Yes.  I want a simpler specification of what is happening.  Currently there's
just a bunch of eager pattern matching rules.  This works, but feels a bit
hacked-together.

In addition I guess what I'm looking for is some kind of type system to express
this.  The current dynamically typed approach will give type errors at
macro (= code generator) execution time, but not at macro compilation time.

program time = stage 0
program compile time = macro run time = stage 1
macro compilation time = stage 2.

There are essentially two cases: one where compile-time objects need to be
completely eliminated by properly combining them, and one where they reduce
to some 8-bit tag that represents a remnant at run-time.

I.e. I want to do  "1000000 30000 /" on an 8-bit machine, with the compiler
catching errors when the result doesn't fit or the operation can't be reduced
when these generators _themselves_ are compiled, not just when they are applied.

It seems this will be a simplification of the MetaOCaml type system - one that
doesn't need to solve name binding issues.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to