Why NH Prof isn't functional

time to read 1 min | 150 words

One of the things that I wanted to do with NH Prof is to build it in a way that would be very close to the Erlang way. That is, functional, immutable message passing. After spending some time trying to do this, I backed off, and used mutable OO with message passing.

The reason for that is quite simple. State.

Erlang can get away with being functional language with immutable state because it has a framework that manages that state around, and allow you to replace your state all the time. With C#, while I can create immutable data structures, if I want to actually create a large scale application using this manner, I have to write the state management framework, which is something that I didn't feel like doing.

Instead, I am using a more natural model for C#, and using the bus model to manage thread safety and multi threading scenarios.