On 22.01.2009, at 15:26, Rich Hickey wrote:

> It's pretty easy to write a trivial struct system, much harder to
> address performance, interop, compilability, dynamicity etc
> constraints.

Indeed.

> As a simple case, if a defstruct is re-evaluated, will objects created
> after that be of the same 'type' as objects created before?

I'd say no, which resolves the next question:

> What if fields have been added/removed?

Anyway, I don't think that re-evaluation is a serious issue, except  
in interactive development sessions. The typical use would be  
defining a struct once and then not touch it any more.

> I'd prefer people experiment with libraries built on the existing
> facilities, with an open mind as to the possibilities of categorizing
> things other than by their structure.

The added flexibility of multimethods is quite appreciable in non- 
trivial situations. But at the moment there is no simple way to  
handle simple situations. Using structs is straightforward and  
familiar from other languages. It is certainly not *the* solution to  
categorizing, but it's a simple one that is good enough for many  
applications.

Konrad.


--~--~---------~--~----~------------~-------~--~----~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to