in

Good technical writing is an art

Good technical writing is an art | tech-memes, program-memes, haskell-memes, terminal-memes | ProgrammerHumor.io
tech-memes, program-memes, haskell-memes, terminal-memes | ProgrammerHumor.io

[text] Well start off with a really simple program that opens a file called girlfriend.txt which contains a verse from Avril Lavignes 1 hit Girlfriend and just prints out out to the terminal. Heres girlfriend.txt Hey Hey You You I dont like your girlfriend No way No way I think you need a new one And heres our program import System.IO main do handle openFile girlfriend.txt ReadMode contents hGetContents handle putStr contents hClose handle Running it we get the expected result runhaskell girlfriend.hs Hey Hey You You I dont like your girlfriend No way No way I think you need a new one Lets go over this line by line. The first line is just four exclamations to get our attention. In the second line Avril tells us that she doesnt like our current romantic partner. The third line serves to emphasize that disapproval whereas the fourth line suggests we should seek out a new girlfriend. Lets also go over the program line by line Our program is several IO