3 ms·
I like this idea and will try to apply it to our code. Why do you prefer it over splitting the code out in a different method? Is it so you can read everything
by spockz 8y ago
I like this idea and will try to apply it to our code. Why do you prefer it over splitting the code out in a different method? Is it so you can read everything in one glance? If so, an ‘inline’ feature could be added to IDEs to show definitions inline.
Also, when using applicative or Monadic style programming there is little reason not to split things of in small separate functions and chain them together in the right order.
- war1025 8y agoYea, it probably doesn't make sense for every coding style. I just find that if I split things apart too much it turns into spaghetti that I have to try to weave my way through to understand what's going on. There are definitely places where it works out really well though.