[Haskell-beginners] How Haskell Fits Into an Operating System / API Environment

Darren Grant dedgrant at gmail.com
Tue Aug 13 07:30:37 CEST 2013


On Mon, Aug 12, 2013 at 9:45 PM, damodar kulkarni <kdamodar2000 at gmail.com>wrote:

>
> Curiously, whenever I use state, my programs start to become similarly
>> brittle. There is no reason why state should be a fundamental element of a
>> programming language, and as a design pattern, state is best avoided at all
>> cost.
>
>
> Just as a curiosity, how would one avoid state in cases like protocol
> design? e.g. protocols specifications (like TCP/IP) do have a large element
> of state dependent behavior that "seems essential" to the problem. How
> would one deal with such cases?
>


State can be achieved in pure functional languages. The difference is that
the state management is not directly accessible to the programmer as it is
hidden behind a highly declarative set of abstractions. This provides the
benefits of consistency, and sometimes frustration when the resulting
machine code doesn't perform as expected.

Cheers,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130812/9854399e/attachment.htm>


More information about the Beginners mailing list