n this post, I aim to:
— Shed light on some of the presumed benefits of small functions
— Explain why I personally think some of the benefits don’t really pan out as well as advertised
— Explain why small functions can actually prove counterproductive sometimes
— Explain the times when I do think smaller functions truly shine
I've been thinking about the best approach to implement pure function verification in the Scala compiler. An approach similar to the one in D would fit a lot better than the one used in Haskell (which would break all existing code and cause some problems due to strict evaluation). A solution using annotations would be quite simple to implement:
Students can draw graphs in a coordinate system. This program is good for especially high school students. The program makes it very easy to visualize a function and paste it into another program. Students can do calculations on the functions.
M. Bilal, and S. Kang. International Journal of Communication Systems30 (5):
e3309(2017)cite arxiv:1702.04055Comment: This article is accepted for the publication in "International Journal of Communication Systems".