Re:Please do not attempt to simplify this code
by spockz on Friday December 28, 2018 @06:24AM
(#18776171)
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.
Re:Please do not attempt to simplify this code
by war1025 on Friday December 28, 2018 @11:20AM
(#18777625)
Yea, 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.
Something like: