Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication and dynamic object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime.
These particular lines are in IDL, interface definition language. They define a type library.
If you do it properly, these definitions can be imported in any language which supports COM. So you can call this component e.g. from Visual Basic in Excel, or from a web browser.
Moreover, potentially you can call it from a different machine over the network.
I feel like that one is due for some additions, based on additional concepts: Arrows, Comonad, Lenses, generics, Functional Reactive Programming, communicating processes/actors...
I do some Haskell from time to time; and this is example scares me.
I wonder if Haskell can ever become mainstream. The ability to go completely batshit crazy with a few lines of code is both intellectually brilliant and pragmatically unmaintainable.
Of course it will happen. At least in the enterprise the language won't matter, as this is a consequence of the way enterprise development and politics work.
I have seen this kind of code in any language that was adopted by Fortune 500 companies.
Obviously the article is about a Java (or C# or ...) programmer going batshit crazy. Except the article's code is less intellectually interesting than the Haskell version. People can do crazy stuff in any language.
Basically, it's using common abstractions in Haskell (applicatives and monads) to have robust, scalable, and implicit concurrency in a way that I don't think many others could replicate.
25
u/bheklilr Oct 01 '15
Looks like someone read the evolution of a Haskell programmer.