Posted by : Rhyf Ahmad Thursday, May 14, 2015

Until now most programs we have written has been pure, meaning that they never changed state. Whenever a function does something other than just return a value, it is known as a side effect. While pure functions have some interesting features like composability, the fact of the matter is that programs aren’t interesting unless they do something: save data to disk, print values to the screen, issue network traffic, and so on.
These side effects are where things actually get done. This chapter will cover how to change program state and alter control flow, which is known as imperative programming. This style of programming is considered to be more error prone than functional programming because it opens up the opportunity for getting things wrong. The more detailed the instructions given to the computer to branch, or write certain values into memory, the more likely the programmer will make a mistake. When you programmed in the functional style, all of your data was immutable, so you couldn’t assign a wrong value by accident. However, if used judiciously, imperative programming can be a great boon for F# development.

Contain 31 pages.



Ebook Preview
Get the ebook now (237 kB)

If the link above doesn't work, try the link below


Mirror: Get the ebook now (237 kB)

Leave a Reply

You can leave a comment to request any article(s), software(s), ebook(s) or report the dead link.
Then I will reply as soon as I can :)

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Recent Post

Recent Posts Widget
Instagram

- Copyright © Madriva -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -