Fork me on GitHub
#clojure-dev
<
2017-11-27
>
gfredericks19:11:46

is there a reason for things like #_ #doesn't-exist 42 and #_ #inst :not-a-string to fail the reader? I understand why it fails based on the current impl, just wasn't sure if that was an intentional design or just something nobody's bothered to change

bronsa19:11:44

same reason why #_ [) fails

gfredericks19:11:22

well arguably my case is somewhat intermediate

gfredericks19:11:55

in order of severity: #_ [), #_ #nothing 42, #_ (not-a-real-function)

bronsa19:11:02

see also:

user=> [#_ #?@(:clj [1 2])]
[2]

bronsa19:11:50

read needs to happen for #_ to behave correctly

gfredericks20:11:12

but there are ways to call read that allow for unrecognized tags

gfredericks20:11:29

so you could implement it as the reader shifting to a more lenient mode for the scope of the #_

bronsa20:11:45

what then [#_ #?@(:clj [#nothing 42 45])] etc

bronsa20:11:49

it wouldn't nest

bronsa20:11:05

correctly, at least

gfredericks20:11:20

oh, I think I see why that case is tricky

gfredericks20:11:51

cool that's good enough for me

bronsa20:11:59

right and I'm sure there are a bunch of other cases like that where making the reader more leninent would actually cause a behavioural change

gfredericks20:11:17

I would put my money on #?@ being the only problem

gfredericks20:11:20

but not a whole lot of money

bronsa20:11:33

damn now I have to take the bet

gfredericks20:11:09

let's agree right now that one of us will pay the other an indeterminate amount of money if this issue is ever resolved