[parenscript-devel] The ps-macro for length
Travis Cross
tc at travislists.com
Sun Aug 17 10:02:19 UTC 2008
Daniel Gackle wrote:
> Parenscript ships with a helper macro like this:
>
> (defpsmacro length (a)
> `(.size ,a))
>
> But there's no "size" function for arrays or strings... in fact, is
> there a "size" function in JS?
.size() is a method from the Prototype library. That probably mixed up
whoever put that in there.
> For most things, it seems like one would
> want:
>
> (defpsmacro length (a)
> `(@ ,a length))
I agree that is more general. I've pushed this fix out to the darcs repos.
Cheers,
-- Travis
More information about the parenscript-devel
mailing list