To put is simply, it would be nice to have a complex type in Clojure, not as a separate namespace, but something that is part of the language. It should interoperate with other Clojure types (like adding a double to a complex), as well as clojure.core.arithmetic. That's what I meant about playing nicely with collections - it should not matter that there is a complex type in a collection. The arithmetic operations on collections should work regardless. Sorry for the confusion. I will spend some time looking into the modifications needed to clojure.core to accomplish this.
I could be wrong but it seemed to me that Alex was suggesting there might be a way to open up the type system so that others can add types "easily". Also, I didn't mean to imply that I don't care about performance. It does matter, but if Clojure doesn't have Fortran-like speeds, then that is fine with me. Unfortunately, at this point I can't be more specific about performance - in either absolute or relative terms. On Tuesday, April 28, 2015 at 8:35:39 AM UTC-4, Gary Verhaegen wrote: > > Your messages are a bit confusing. Playing nice with collection functions > would depend on the collection, not on its contents. > > Maybe you could elaborate a bit more on what you're trying to accomplish? > > If you do not care about performance, you need to decide whether you want > your type to work with clojure.core arithmetic operators, which from Alex's > comments would seem to require modifying Clojure itself, or if it would be > acceptable to you to define your own operators in your own namespace (which > could check the type and default to the clojure.core versions, providing > some transparency in exchange for some performance). Of course, you then > have to worry about other functions that maybe call clojure.core operators > indirectly, and the bahavior of functions such as min and max. > >> >> -- 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 Note that posts from new members are moderated - please be patient with your first post. 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.