Re: FYI: problem I had with namespace, defrecord, and import, or Hyphen characters in namespaces considered harmful

2011-12-04 Thread Don Jackson
On Dec 2, 2011, at 1:29 PM, Phil Hagelberg wrote: I was using defrecord for the first time, to create a type that I wanted to throw+ via slingshot to signal errors from a library. For what it's worth, the main point of slingshot is removing the necessity of creating custom classes for

Re: FYI: problem I had with namespace, defrecord, and import, or Hyphen characters in namespaces considered harmful

2011-12-03 Thread Stuart Sierra
And even that (custom exception classes) should become unnecessary with the almost complete CLJ-733 (data conveying exception). -S -- 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

FYI: problem I had with namespace, defrecord, and import, or Hyphen characters in namespaces considered harmful

2011-12-02 Thread Don Jackson
I was using defrecord for the first time, to create a type that I wanted to throw+ via slingshot to signal errors from a library. I'd seen an example of this in another library, and I pretty much just cut and pasted it into my project. I understood that I need to explicitly import the

Re: FYI: problem I had with namespace, defrecord, and import, or Hyphen characters in namespaces considered harmful

2011-12-02 Thread Sean Corfield
Given that this seems to bite quite a few people who try to use defrecord / import (even if it only bites them once), perhaps it would be a nice enhancement for import to allow hyphen and automatically translate it to underscore in the package / namespace? It seems very inconsistent given that the

Re: FYI: problem I had with namespace, defrecord, and import, or Hyphen characters in namespaces considered harmful

2011-12-02 Thread Stuart Sierra
Clojure 1.3 mitigates this problem somewhat by defining public constructor functions for record types, so you can use/require the namespace and call the constructor functions. Then the class names are only needed for interop or type hints. Clojure 1.2.0 had a bug (CLJ-432) whereby hyphens in

Re: FYI: problem I had with namespace, defrecord, and import, or Hyphen characters in namespaces considered harmful

2011-12-02 Thread Phil Hagelberg
On Fri, Dec 2, 2011 at 1:44 AM, Don Jackson cloj...@clark-communications.com wrote: I was using defrecord for the first time, to create a type that I wanted to throw+ via slingshot to signal errors from a library. For what it's worth, the main point of slingshot is removing the necessity of

Re: FYI: problem I had with namespace, defrecord, and import, or Hyphen characters in namespaces considered harmful

2011-12-02 Thread Stefan Kamphausen
Hi, to be honest I'd rather not see any magic behavior of the importing mechanism. Better to fail early, but with a suitable error message, no? Cheers, Stefan -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to