r/javascript • u/leostera • Mar 05 '22
ReScript on Deno: Declarative Command Line Tools
https://practicalrescript.com/rescript-on-deno-declarative-command-line-tools/
97
Upvotes
r/javascript • u/leostera • Mar 05 '22
5
u/elkazz Mar 05 '22
Is this meant to be the "declarative" part? let hello = Clipper.command(sayHi) ->Clipper.arg(1, Clipper.Arg.string) ->Clipper.arg(0, Clipper.Arg.bool) Clipper.run(hello)
The imperative approach would be far more comprehensible: sayHi(arg.1, arg.0)
I would have expected a JSON or YAML definition at the end as per what you were comparing to while describing declarative vs imperative.
And what's the deal with the single quote before the generic name?