needs a reader syntax for floats

2012-08-14 Thread Matthew Kennedy
While doing image processing in Clojure recently it occured to me that it would be handy to have a specifier suffix for distinguishing between doubles and floats as libraries in this domain often use single precision floats instead of double precision (or mixtures of both). My code frequently

Re: needs a reader syntax for floats

2012-08-14 Thread Sean Corfield
On Mon, Aug 13, 2012 at 11:14 PM, Matthew Kennedy burnsid...@gmail.com wrote: [(float 0.12) (float 0.33) (float 0.56)]. That's a sequence of Float objects not a float[], just FYI. As far as I can tell there's no way to do this with user code. I think it would have to be done within the

Re: needs a reader syntax for floats

2012-08-14 Thread Matthew Kennedy
On Tuesday, August 14, 2012 3:33:03 PM UTC-5, Sean Corfield wrote: Could you use the extensible reader literal approach? I know the syntax wouldn't be quite as clean, but if you genuinely need float[] as well as float values, that might be more convenient in the long run. In some