On Sat, Feb 5, 2011 at 1:01 AM, Alan wrote:
> That's not how macros work. They can only operate on the parameters
> they're passed, as symbols and lists.
Clojure macros can also see literal maps, sets, and vectors, not to
mention integers, strings, and the like. (Ever seen
"IllegalArgumentExcepti
That's not how macros work. They can only operate on the parameters
they're passed, as symbols and lists. If you prepare a value for them
elsewhere, those values will only be available in the macroexpansion
(runtime), not at compile time.
Granted, it would be nice if the functionality were exposed
It would be better if your macro would accept maps and vectors,
because those can be prepared somewhere else and passed around as
parameters. Your current macro allows only hardcoding.
On Feb 3, 4:23 pm, Alexander Yakushev wrote:
> >(deflayout frame
> >{:west gamepanel
> >:east (deflayout side
If you only intend to support border and flow layouts, you could
reduce the verbosity by maps implying border layout and vectors
implying flow layouts. That approach would limit you to simpler
layouts, but your example would become something like this:
(deflayout frame
{:west gamepanel
:east
Hi,
On 3 Feb., 14:10, faenvie wrote:
> i would love to see the knowledge that
> karsten lentzsch put intohttp://www.jgoodies.com/
> transmitted to or adapted for the clojure-cosmos.
I started something in this direction a while ago.
http://bitbucket.org/kotarak/jazz
However, it's a bit outdate
i would love to see the knowledge that
karsten lentzsch put into http://www.jgoodies.com/
transmitted to or adapted for the clojure-cosmos.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
N
On Feb 2, 7:43 pm, Alexander Yakushev wrote:
> Usage of the lib is very easy. Here is an example from my tetris game:
>
> (deflayout
> frame (:border)
> :WEST gamepanel
> :EAST (deflayout
> sidepanel (:flow :TRAILING)
> nextpanel
> (JButt