4 ms·
Typescript has a standard library like clojure for manipulating data? like the lodash of the JS world. I would be surprised (without golfing of course) if type
by Scarbutt 8y ago
Typescript has a standard library like clojure for manipulating data? like the lodash of the JS world.
I would be surprised (without golfing of course) if typescript can match clojure's conciseness.
- dragonshed 8y agoNo, typescript adds as little as possible to support its language features. You'll need to rely on js libraries or browser features for the API.
- idontpost 8y agoI didn't say it could match it. I don't think it can, but you can write it very concisely if you choose to. There's not a big difference in concisesness or readability between Clojure threading macros and JS promise chaining, for example: (-> (do x) then-do-y then-do-z then-do-q) vs doX() .then(doY) .then(doZ) .then(doQ); Of course, the Clojure version is more flexible, and the ability to define DSLs very simply allows for further conciseness, but that's all beside the point. My point is just that Typescript can be written very concisely or very verbosely, depending on your own coding style.