Module Level Purity

As the new age of multi-cores on the horizon, parallelism and state handling is getting more and more important. Currently mainstream languages are imperative ones which are designed without concerning these topics.
Is there any language that "has a module system with a just monadic public interfaces (exported code-interface of the module must be a Monad); and still supports side-effects inside module level code"?
That would construct a great ecosystem in which all imperative developers can solve their problems in imperative ways and yet benefit from module level purity!
That would be very interesting to work with such a system!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Yes there are

Unix shell languages are a classic (not perfect but good) example. And, yes, they can exploit multi-cores well. Streaming-database tools can be very handy in some fields, for example.

I think that flower (and XQVM) also pretty much fits that description, although it isn't presented in a conventional "here is a new programming language" way. It's not entirely unlike unix shell programming in that you concatenatively compose arbitrary pure and side effecting computation steps in interesting ways.


Agreed; but the things that

Agreed; but the things that we actually have already, implements different aspects of this, just partially and without any solid backbone. In fact I was day dreaming on this and now you have mentioned the main philosophy of Unix, an analogy appears in my though: "I want a side-effect-free COM". Remember when COM came along, it became an infrastructure for everything. Now we know about all aspects of designing a new module system, without old mistakes.
I think this feature must be integrated into the language instead of OS; so things have place to grow and get better.
And every module can choose to behave itself as itself or even as a foreign module.
Nice Regards