1,879 reputation
822
bio website
location
age
visits member for 1 year, 10 months
seen 2 days ago

Aug
14
comment “Everything is a Map”, am I doing this right?
You're going to have to show me an example because in my experience with this, I can move things around at will and it has very little effect. Just to prove it to myself, I moved two random subprocess calls in the middle of my update() function. I moved one to the top and one to the bottom. All my tests still passed and when I played my game I noticed no ill effects. I feel my functions are just as composable as the Clojure example. We're both throwing away our old data after each step.
Aug
14
awarded  Nice Question
Aug
13
comment “Everything is a Map”, am I doing this right?
OK, I'll look into that (and comment on it later). But what do you think about the idea of using the pattern?
Aug
13
comment “Everything is a Map”, am I doing this right?
@MasonWheeler lets say you are right about this. Are you going to void every other point he makes because of this one thing is wrong?
Aug
13
comment “Everything is a Map”, am I doing this right?
In the end is it really "very, very different"? In the Clojure example he overwrites his old state with the new state. Yes, there's no real mutation going on, the identity is just changing. But in his "good" example, as written, he has no way to get the copy that was passed into subprocess-two. The identify of that value was overwritten. Therefore, I think the thing that's "very, very different" is really just a language implementation detail. At least in the context of what you bring up.
Aug
13
comment “Everything is a Map”, am I doing this right?
I see. Is that a "immutable data in imperitive languages" issue or a "immutable data" issue? IE: Maybe this isn't an issue in Clojure code. But I can see how it is in JS. It's also a pain to write all the boilerplate code to do it.
Aug
13
comment “Everything is a Map”, am I doing this right?
"the benefits of immutability go way down the larger your immutable objects get" Why? Is that a comment on performance or maintainability? Please elaborate on that sentence.
Aug
13
suggested suggested edit on “Everything is a Map”, am I doing this right?
Aug
13
comment “Everything is a Map”, am I doing this right?
BTW: re: the main argument against it: That seems true whether this were in clojure or javascript. But it's a valuable point to make. Perhaps the listed benefits far outweigh the negative of that.
Aug
13
comment “Everything is a Map”, am I doing this right?
Yes, since I usually mutate it, it IS a global. Why bother passing it around? I don't know, that's a valid question. But my gut tells me that if I stopped passing it, my program would instantly become harder to reason about. Every function could do either everything or nothing to the global state. The way it is now, you see that potential in the function signature. If you can't tell, I'm not confident about any of this :)
Aug
13
asked “Everything is a Map”, am I doing this right?
Aug
6
comment Writing Tests for Existing Code
@DanPichelman that's only ideally true. Assuming you said that in the context of the question, you're right because he's already said it's testable. But often you have to modify production code to make it testable.
Jun
28
comment What are some techniques I can use to refactor Object Oriented code into Functional code?
Thanks a lot for taking the time to write this up. Some examples would be greatly appreciated (and personal projects don't help with this because they show the "after", they don't show how to get there from "before"). This would be most useful in your section titled "Functional Style Interfaces".
Jun
24
comment What are some techniques I can use to refactor Object Oriented code into Functional code?
@Giorgio good to know. I'd prefer to "ban" mutation first and optimize second, though.
Jun
24
asked What are some techniques I can use to refactor Object Oriented code into Functional code?
Jun
15
awarded  Yearling
May
31
comment What is the supposed productivity gain of dynamic typing?
As the comments above me are pointing out, this is a very thorough answer with a lot of good information in it, but it's mostly misleading. Most of your reasons to be more productive exist in statically typed languages. I've heard that SmallTalk (which is dynamic) has really good auto completion.
May
15
comment How do the Application and Database Interface Layers interact at their boundary?
OK that makes sense to me, too. But how/who populates this Order Gateway Implementation? Is it a DAO or a DTO, both, or neither?
May
5
awarded  Nice Answer
May
2
awarded  Popular Question