On Thu, 2007-08-30 at 21:05 -0700, Erick Tryzelaar wrote:
> I'm enjoying playing around with felix's dssls, but there are some
> things that would make the process a little bit easier than it is
> right now.
> 
> * First off, we really need a way to print out the scheme-converted
> code pre and post evaluation.

There is code to do that. Ditto for conversion to sex and flx AST
formats. They're no switchable atm (no access to the 
arguments, plus in the scheme eval, the args have to be buffered first
which is expensive).

> It looks like it'd be relatively simple to do. All you'd have to do is
> change what the rule "statement_star" returns to have it not pass the
> statements to ocs2sex and wrap the old behavior in a helper function.

Code is already there, just commented out.

> * SCHEME blocks containing more than one define

Yep. I think you can do 

(begin
        (define ..)
        (define ..)
)

but I'm not sure. This is a property of R5RS Scheme standard.

> * The platform macros ugly up the output from flxp, which just adds a
> little more to track down the location. Could these be changed from
> macros to just "val WIN32 = false; val MACOSX = true"? Or does that
> cause other problems for the macro expander?

It depends which phase is doing the test. Conditional preprocessor,
syntax macro, and desugaring expansions all require differently
phased symbols.

> * it'd be handy if we could output an file, play around with it, and
> then pipe it through the next stage in compilation.

Yep.

> * there are a lot of ugly arbitrary-seeming options, like the first
> argument to ast_lambda. I know you can use dlftvs, but I wish we could
> use something like records and optional arguments so we could just
> ignore all that other stuff. That'd need some scary scheme extensions
> though.

That is just because I faithfully reflected the existing hacked
up Felix AST format. That can be fixed in a number of ways in
a number of places. however I didn't feel like changing multiple
aspects all at once (or I'd never track down bugs).

> * pattern matching would be handy

Yes indeed.

> * it's great that you can embed felix code in a rule like this: "foo
> =># (_1 + 2)" but it'd be even more handy if you could use
> sub-functions, like this "foo bar =># map (fun _1 => _1 + 2) _2)" but
> that gives a compile error.

Err .. well you have unbalanced parenthesis in that .. :)

There is a problem, mixing and matching Scheme and Felix ASTs:
there are Scheme -> sex -> flx AST converters but not in the
other direction.

The expression syntax =># ( .. ) actually works using the old
syntax macro processor expander.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to