4 ms·
Wouldn't this be this just as feasible and elegant in JS, Python or Scala? Maybe not as short but short enough. Then again with Python I'd just fire up NumPy o
by sireat 6y ago
Wouldn't this be this just as feasible and elegant in JS, Python or Scala? Maybe not as short but short enough.
Then again with Python I'd just fire up NumPy or ugh Pandas(which is basically NumPy with benefits) for this kind of transformation.
- adamkl 6y agoYou could definitely do something like this in other languages, probably even in Java/C# using a HashMap or Dictionary, but the difference is that this is “the way” you would do this in Clojure. It’s not, generally speaking, they way you’d do it in the other languages you mentioned. I think it’s one of the reasons why people always say that learning Clojure makes them better developers even when they’re not using Clojure. The ideas that that take away from idiomatic Clojure and use in other languages.