On 2/1/10, Vladimir Sedach vsedach@gmail.com wrote:
I just pushed a patch that should do the right thing; take a look.
That works, but the functionality is missing from ps-compile-stream (and therefore ps-compile-file), so I've added this too (see patch for inspiration, or if it's acceptable/modifiable, merge?).
I also wonder if (in case I wasn't clear in my original email) this actually makes more "sense" for parenscript?
(lambda () nil) => function () {return null;}
(lambda () (values)) => function () { }
(lambda () (values 1 2 3)) => function () { ok, nevermind??? }
Not sure either way.
I don't think my changes have broken anything in the meantime :) However, while all the tests passed, there's a warning too:
Running other tests: ...........................................................................................................................................; in: LAMBDA NIL ; (PARENSCRIPT::PS-COMPILE PARENSCRIPT-TEST::X) ; ; caught WARNING: ; undefined variable: X ; ; compilation unit finished ; Undefined variable: ; X ; caught 1 WARNING condition .................................................................................
I could not hunt down (quickly) the cause of this warning, so I haven't done anything.
Thanks for the good work!
Yong
Vladimir
2010/1/27 szergling senatorzergling@gmail.com:
On 1/27/10, Vladimir Sedach vsedach@gmail.com wrote:
I've also found that annoying about macros. I'm going to see what can be done.
Vladimir
Thank you. Look forward to it.
By the way, I think implicit return is a very useful feature.
Yong.
2010/1/26 szergling senatorzergling@gmail.com:
Hi folks,
I was wondering if there's an idiom for skipping the generation of a form completely at the top-level. This is mildly related to the implicit return feature currently being trialled. Here's an example: suppose I'm trying to skip over this form:
(in-package :something-something)
by using
(defpsmacro in-package (x) nil)
An in-package form then compiles to "null;"
This spurious output may result in errors (I'm using ps to convert my Lisp code to Actionscript).
How about using (values) to indicate explicitly that something doesn't have any return values?