agrafix / Spock

Another Haskell web framework for rapid development
https://www.spock.li
678 stars 56 forks source link

Strictness in API data types #96

Closed elfeck closed 7 years ago

elfeck commented 7 years ago

Hello,

I've been toying with the API example on sppock.li and noticed that all data types used in the API definition are strict (i.e. !T.Text or !User). Why is strictness used here? Is it necessary?

Thanks!

agrafix commented 7 years ago

I have made it my personal convention to make all data types strict except there is an explicit reason to make them lazy. This helps preventing space leaks to some extent, but is not strictly required in the example given.

agrafix commented 7 years ago

Please feel free to email me if you have more questions ;-)