Alternatives to UML for Functional Programmers

designfunctional programmingmodelinguml

I'm CS student. I am currently attending lectures, where we're taught Objective Analysis and Design. It consists mostly of writing use cases, analysing the problem that we can face when writing some application for the client, and how to design the project so that it's both extensible, clear to developers, and doesn't spawn problems when client argues about some features. Since it's 'objective', we're learning it from OOP point of view(classes and such).

Now we're using UML as a helper tool. I believe I have a good grasp on OOP, but I have also learned functional paradigm and used it successfully in some of my smaller projects.

Our teacher, when confronted with "what about functional paradigm?" question, answered that he wasn't programming any larger project in functional languages, and he doesn't know what tool may functional programs be using.

So, what would they use? Is there some methodology for this? Or maybe there's no need for such thing?

Best Answer

I can't speak for all functional programmers, but those I know all start out by writing the type signatures of the top-level functions, then as they need more detail, they write the type signatures of the helper functions, and so forth.

This works because of the lack of side effects in functional programming, so functions are all specified in terms of only their inputs and outputs. This makes their type signatures much more useful as a design tool than in imperative programming. That's one reason you see them used even when the compiler could infer them.

As far as diagramming tools go, with all due respect to your professor, I haven't used those to any significant degree in any paradigm since I left school.