Clojurians
#cljs-dev
<
2016-03-03
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

pat16:03:29

anyone have any thoughts on adding reader support for bin & oct literals? just a convenience but would remove some mental friction (for me at least)

jr16:03:29

user=> 064
52

pat16:03:50

js strict mode disallows that I believe. ES6 added 0o64, which has been in chrome & friends for couple years

jr16:03:09

ah cljs

pat16:03:39

the way js handles strings makes it tricky

juhoteperi17:03:50

I think {radix}r{number} should work in Cljs

mfikes17:03:07

They do, and so do 0x… and 0…

pat17:03:13

yes and reader defers to parseInt with radix arg. Im just saying convenience.

pat17:03:26

we've got hex why not bin and oct

mfikes17:03:35

@pat You’d like ClojureScript’s reader to support JavaScript numeric literals?

pat17:03:39

yes, I'm just concerned that a patch gets rejected because that behavior is not in LispReader.java