haskell - As OOAD is to OOP what is the equivalent for functional programming? -


i've forayed world of functional programming (fp) , wondering how "think functionally" moderately sized applications? w.r.t. analysis , design of fps.

with oop we're trained think in terms of objects, attributes , relations. model our analyses/designs using class , sequence diagrams. however, same models seem bad fit when designing fps. equivalent modeling paradigms functional programming? seems dfds maybe fit maybe wrong.

for example: thinking of designing simulation of monopoly, board game using haskell, learn language. when doing ooad come classes board contains items have attributes/methods attached it. have player , various other objects , associated relations can captured in class diagram. , interactions in sequence diagram. however, these modeling paradigms doesn't seem transfer functional programs. "how" model functionally?

note: i'm looking concrete references/examples can explain how analyze , design functional programs given i'm coming heavily object-oriented way of thinking/modeling.

according simon peyton jones:

the language in write profoundly affects design of programs written in language. example, in oo world, many people use uml sketch design. in haskell or ml, 1 writes type signatures instead. of initial design phase of functional program consists of writing type definitions. unlike uml, though, design incorporated in final product, , machine-checked throughout.

source: masterminds of programming

so instead of drawing fancy uml diagrams, write type definitions coupled undefined in design phase.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -