Hi,
In order to learn and experiment with clojure, i'm implementing a (for
now, toy) build system. The idea is to replace makefiles or ant build
files or your-favourite-make-replacement files by specifications written
in a clojure-based embedded DSL (same thing as, for example, Rake or
Scons).
A central concept in such a system is, of course, a task, which has
associated some unsurprising bits of data: a build procedure,
dependencies, a staleness predicate... In other languages (i've coded
some prototypes in Scheme and Common Lisp in the past) you would
typically define some sort of structured type to hold this data (for
instance, i was using CLOS in CL). But i was thinking that, in clojure,
it could make sense to put this information in (possibly tagged)
metadata, so that any clojure object can behave as a task.
My gut feeling is that such design would buy me some flexibility,
avoiding the usual type system straitjacket; and, anyway, it seems kinda
fun. But clojure is the first language i use providing metadata, and i
lack the experience to know whether i'm on sound ground here.
So, my question: do you think that this would be a good, idiomatic use
of metadata? Is there any code or conceptual discussion on metadata and
its uses?
Thanks,
jao
--
Always have a vision. Why spend your life making other people’s dreams?
-Orson Welles (1915-1985)
--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---