Fork me on GitHub
#clojure-spec
<
2018-03-14
>
gfredericks01:03:56

if it was big you could call it andre the giant macro

gfredericks01:03:24

@bronsa what's wrong with &?

bronsa08:03:07

syntax quote doesn't qualify it

gfredericks11:03:40

why on earth would that be true?

bronsa12:03:02

because otherwise you’d have to

`(fn [a# ~'& b])

gfredericks12:03:29

aw dang I figured it somehow related to &env and &form; forgot about destructuring

gfredericks12:03:15

so this only affects users who are refering s/&

bronsa12:03:42

or macros defined in the same ns

bronsa12:03:52

but tbh the same happens when naming a var def

bronsa12:03:56

which I also don’t like

gfredericks12:03:14

that's a different underlying cause, right?

bronsa12:03:40

no same reason

gfredericks12:03:33

I guess I figured special formedness was checked in one place and &ness somewhere else; are there any other exceptions?

bronsa12:03:26

they’re all in one place

bronsa12:03:27

user=> (keys Compiler/specials)
(& monitor-exit case* try reify* finally loop* do letfn* if clojure.core/import* new deftype* let* fn* recur set! . var quote catch throw monitor-enter def)

bronsa12:03:38

& is considered a special form by the reader

mikerod13:03:11

Insightful

dpsutton22:03:18

can you spec cljs.core/+?

dpsutton22:03:53

and i realize that's a seemingly silly question but we've got js/big floating around which allows for arbitrary precision decimal arithmetic but the built in operators do not behave well. So i'd like to spec it and use it to help verify that no js/Big's are leaking into any arithmetic anywhere