Fork me on GitHub
#clojure-dev
<
2018-10-29
>
ghadi02:10:22

Streams are typically used in a reduce-like fashion (with a Collector at the end) rather than as seq / iterable. Perhaps extending CollReduce to Stream could be useful

👍 1
gfredericks13:10:51

is there a good reason for Var to have an internal dynamic attribute instead of using metadata the way the macro and private flags work?

bronsa13:10:16

it's faster to check

gfredericks13:10:27

isn't that just compile time?

bronsa13:10:29

and the metadata came after the attribute

bronsa13:10:45

so probably just historical

bronsa13:10:00

I remember for some time there could be a mismatch between the attribute and metadata too

gfredericks13:10:04

I feel like you could argue that having the metadata present is fairly misleading if it doesn't actually have any effect

bronsa13:10:17

i think raynes had a patch that made them sync

bronsa13:10:27

raynes :(

🙁 4
gfredericks13:10:10

okay well at least it's been talked about

bronsa13:10:22

maybe I'm misremembering things a bit

bronsa13:10:25

as far as I remember, for some time there was just setDynamic, and dynamic vars had to be earmuffed -- then the :dynamic metadata was added

bronsa13:10:52

but it's been too many years and this is off the top of my head

gfredericks13:10:27

you can at least still have a mismatch, I just verified that

gfredericks13:10:42

if I alter-meta! something to add/remove the ^:dynamic flag, it has no effect on the result of .isDynamic

gfredericks13:10:06

I feel like the cleanest thing is to remove the internal flag altogether, but I'm not a dentist

danielneal13:10:40

test.checkup

gfredericks13:10:50

I saw somebody on twitter use "I'm no dentist" as a non-sequitur stand-in for "I'm not an expert" and now I can't stop doing it

danielneal13:10:49

😄 hard adopting this

👍 1
bronsa13:10:33

yeah I agree