Re: Rationale of behavior when invoking composite data type as 0-arity function

2021-12-05 Thread dieter.v...@gmail.com
Hello Brent, thank you for the response. You're right, better keep a clear distinction between invoking and evaluating. On Thursday, November 25, 2021 at 3:35:09 PM UTC+1 brent@gmail.com wrote: > Ok so I think taking a step back, I think their is some complecting going > on here. I don't s

Re: Rationale of behavior when invoking composite data type as 0-arity function

2021-11-25 Thread Brent Millare
Ok so I think taking a step back, I think their is some complecting going on here. I don't see how you see "that invoking a map without arguments evaluates it" as a generalization. I believe Rich's intention behind map's, set's, and vector's being callable is that they naturally behave as primi

Re: Rationale of behavior when invoking composite data type as 0-arity function

2021-11-24 Thread Dieter Van Eessen
Hello Brent, The use case I had in mind was to keep a map readable during development. Take a simple map: {:type QTDIR :path (hash "a string")}. It's easier to play with this data if evaluation of certain symbols and functions is delayed. Thanks you both for your answer, kind regards, Dieter

Re: Rationale of behavior when invoking composite data type as 0-arity function

2021-11-21 Thread Brent Millare
I'm curious why you are saving hashmaps that have clojure code within it with the intention of evaluating this code as embedded in the hashmap? What is the use case? Are you trying to delay evaluation? Regardless, eval always incurs a cost and should generally be avoided if you can use "runtime

Re: Rationale of behavior when invoking composite data type as 0-arity function

2021-11-21 Thread James Reeves
On Sun, 21 Nov 2021, at 2:22 PM, dieter.v...@gmail.com wrote: > repl> (mydata) > ... (ArityException)... > repl> ; instead i have to type eval > > repl> ((eval mymap) :b) > -304538205 > > I know its only 4 letters and a space extra, but software composition is > supposed to avoid code duplicati