Re: loss of gen-and-load-class functionality

2008-11-22 Thread Stuart Sierra
> On Nov 21, 10:15 am, Stuart Sierra <[EMAIL PROTECTED]> > wrote: > > Don't know if this is supported now not, but here's my old > > gen_classes.clj: ... On Nov 22, 12:19 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > And how did you organize the implementation side? Nothing fancy; one file per (g

Re: loss of gen-and-load-class functionality

2008-11-22 Thread Rich Hickey
On Nov 21, 10:15 am, Stuart Sierra <[EMAIL PROTECTED]> wrote: > On Nov 21, 8:46 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > I'd appreciate examples of gen-and-load-class and gen-and-save-class > > use not well supported by the AOT gen-class. > > Don't know if this is supported now not, but

Re: loss of gen-and-load-class functionality

2008-11-21 Thread Stephen Wrobleski
On Fri, Nov 21, 2008 at 03:38:01PM -0500, Stephen Wrobleski wrote: > Now, I can see a standard way of doing something like this > > (defmacro def-gen-class [name & options] > (let [{:keys [name bytecode]} > (eval `(gen-class ~(str name) [EMAIL PROTECTED]))] > (if *compile-files* >

Re: loss of gen-and-load-class functionality

2008-11-21 Thread Stephen Wrobleski
On Fri, Nov 21, 2008 at 05:46:00AM -0800, Rich Hickey wrote: > I'd appreciate examples of gen-and-load-class and gen-and-save-class > use not well supported by the AOT gen-class. > > What I am interested in is the scenarios/use-cases. I've got a DSL which compiles an abstraction to a class. The

Re: loss of gen-and-load-class functionality

2008-11-21 Thread Stuart Sierra
On Nov 21, 8:46 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > I'd appreciate examples of gen-and-load-class and gen-and-save-class > use not well supported by the AOT gen-class. Don't know if this is supported now not, but here's my old gen_classes.clj: (defmacro defclass [name & args] `(do

Re: loss of gen-and-load-class functionality

2008-11-21 Thread Robert Lally
I'm not entirely clear how the new AOT compilation works, or how I convert old code to use the new mechanism. As an example - I had a call to gen-and-save-class in a file that created a custom exception type just before the function that would throw it was defined. I've changed that to just gen-cl

Re: loss of gen-and-load-class functionality

2008-11-21 Thread Rich Hickey
On Nov 20, 4:42 pm, Stuart Sierra <[EMAIL PROTECTED]> wrote: > On Nov 20, 2:14 pm, Stephen Wrobleski <[EMAIL PROTECTED]> wrote: > > > Furthermore, requiring the use of (ns ..) to create a class makes defining a > > class with a macro somewhat tedious (seems like you'd have to bind *ns*, so > > t

Re: loss of gen-and-load-class functionality

2008-11-20 Thread Stuart Sierra
On Nov 20, 2:14 pm, Stephen Wrobleski <[EMAIL PROTECTED]> wrote: > Furthermore, requiring the use of (ns ..) to create a class makes defining a > class with a macro somewhat tedious (seems like you'd have to bind *ns*, so > that (ns ..) could mutate it), if even possible. This is probably tempora

loss of gen-and-load-class functionality

2008-11-20 Thread Stephen Wrobleski
Am I right that now the only way to define a class is to use the AOT compiler? The :gen-class subform in (ns ...) doesn't work when running/loading files, only when compiling. Furthermore, requiring the use of (ns ..) to create a class makes defining a class with a macro somewhat tedious (seems l