You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The name *in* now collides with clojure.core/*in*, an unforeseen problem when babashka was initially just designed to deal with small one-line snippets. The value *in* is really a delay which, when realized, reads a line of text or EDN value from stdin. We will remove this magic behavior and expose user/stdin as a delay that users could have written themselves in normal Clojure.
borkdude
changed the title
Rename user/*in* to user/stdin and don't hide that it's a delay
Rename user/*in* to user/stdin and don't hide that it's a delay (BREAKING!)
Dec 19, 2019
borkdude
changed the title
Rename user/*in* to user/stdin and don't hide that it's a delay (BREAKING!)
Get rid of special *in* variable (BREAKING!)
Dec 19, 2019
The name
*in*
now collides withclojure.core/*in*
, an unforeseen problem when babashka was initially just designed to deal with small one-line snippets. The value*in*
is really adelay
which, when realized, reads a line of text or EDN value from stdin. We will remove this magic behavior and exposeuser/stdin
as a delay that users could have written themselves in normal Clojure.This is a reaction to #171.
Option 0:
Only rename, no other changes, leave the magic.
The new syntax becomes:
or:
(or some other name that we like best).
This option is the least breaking one.
Option 1:
The new syntax becomes:
We're not hiding the fact that we're using a delay in the implementation.
Option 2:
Deprecate a special variable for stdin. We have
read-line
anyway. But what do we do for reading EDN? People should use(edn/read *in*)
?For reading all EDN values from stdin:
The text was updated successfully, but these errors were encountered: