User loginNavigation |
archivesProgramming Language Beauty: Look ClosureIn the past year I have been passionately fighting what Simon Peyton Jones calls "the effects monster", although often it feels like I am fighting windmils instead. No useful programs can be written without effects, but effects turn bad when they are observable from within the program itself. Instead we should strive for encapsulating effects such that they become harmless first class pure values, but more on that in the future. In this first installment in a longer series on the perils of side-effects, we will look at one of the most beautiful examples of observable effects, namely closures and variable capture in imperative languages. Text Processing by Functional Language?Doing computational linguistics, I've passed through several languages and settled on Python as the most convenient thing so far for text processing. I've also read a lot about the attractions of functional programming and have wanted to try applying it to my own work. However, whenever I see FP application to things like string manipulation and regexes (e.g. in Haskell), it seems horribly messy to me, done just to show that it can be, not because it's a good idea. Am I the victim of bad examples or is text processing something that just shouldn't be done with a functional language? |
Browse archivesActive forum topics |