does each class need its own file when I include Java files?

2017-09-19 Thread lawrence . krubner
I need to add something very much like this to my Clojure app: https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java I currently have source paths set up as: src/ clojure/ java/ I believe I can copy-and-paste most of this code in

Is it wrong that I'm thinking about this?

2017-09-19 Thread Didier
I've been thinking since using Clojure.spec fdef that I'd like something like this: (defns foo [x string? y int?] string? forms) Where an s/fdef spec automatically build of this form: (s/fdef foo :args (s/cat :x string? :y int?) :ret string?)) And obviously the foo var and function w

Re: Is it wrong that I'm thinking about this?

2017-09-19 Thread Alex Miller
There's a lot of value in separating the specs from the functions. You can put them in different places and only use just the specs (to spec an API for example) or just the functions (for production use where you don't need the specs). And downsides are that it obscures which parts are fn and wh

Re: Is it wrong that I'm thinking about this?

2017-09-19 Thread Gary Trakhman
I think there's the spec is a 'side-band' system (well except we want to the compiler to know about it for macros) design constraint, but additionally, I think it's worth thinking about: Defn right now is primitive enough to be fast and powerful enough for large programs. There are many general a

functions with metadata, 2 problems: performance hit and equality not preserved.

2017-09-19 Thread John Alan McDonald
I'd like to be able to do something like: (defn square ^double [^double x] (* x x)) (def meta-square (with-meta square {:domain Double/TYPE :codomain Double/TYPE :range {:from 0.0 :to Double/POSITIVE_INFINITY :also Double/NaN}}) https://clojure.org/reference/metadata says "Symbols and collection

Re: functions with metadata, 2 problems: performance hit and equality not preserved.

2017-09-19 Thread Alex Miller
On Tuesday, September 19, 2017 at 8:01:07 PM UTC-5, John Alan McDonald wrote: > > I'd like to be able to do something like: > > (defn square ^double [^double x] (* x x)) > (def meta-square (with-meta square {:domain Double/TYPE :codomain Double/TYPE > :range {:from 0.0 :to Double/POSITIVE_INFIN