Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The point is exactly, it is somewhat easier exactly in that one case when you have a single state _foobar_ somewhere and work with it all the time. In almost all other cases the second case is actually simpler.

I don't know R and I don't really want to know it. For me, it doesn't seem to bring anything extra to the table that I couldn't do in Clojure or ClojureScript much more consistently and simply. If in my project, I have a number of transformation functions for my state, passing it around isn't a huge deal as it is just a nested map usually. It forces you to be very consistent and helps you as the project grows. Also, most of the functions are easily transferable between projects even when the state would have a very different structure.

Of course the whole thing is a complicated topic and in some cases you want mutability and local state e.g. because the performance is a bit better. Usually, that involves a few simple transformations.



See, this is because you don't deal with data and statistics on a regular basis, which I do.

And if you figure out how to fit a generalised additive model in clojure with one line of code, please let me know :)

So, in DS/stats you end up needing mutability because the datasets are really large, and the models take a long time to run, so copying is generally bad.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: