Course:CPSC312-2023/ToDoList
Authors: Ken Yu, Sam Lee
What is the problem?
Keeping track of things that needed to be done is difficult and stressful. Having a to-do list that has all your tasks in one place ensures you don't forget and gives you peace of mind and increases your productivity.
What is the something extra?
The to-do list is able to keep your tasks in memory so they persist through shutdown and you can access them at a later date.
What did we learn from doing this?
We learned how to use Haskell libraries to make our data persistent by using the System.IO and System.Directory packages. These functional programming packages allowed easy reading/writing to files.
Advantages of Functional Programming for To-Do List Application:
- Code is immutable therefore we aren't worried about some function changing your todo list accidentally.
- In functional programming, functions are more focused on specific tasks which is great for a todo list application which has clear separate functions such as adding / removing tasks.
Disadvantages:
- Some parts of functional programming are definitely less readable as code is more concise.
- Immutability was also a disadvantage when trying to avoid repetition in code as you couldn't just use a dynamic global variable and had to pass values directly as function parameters.