in

ASP.NET Weblogs

Philip Rieck

Phil in .net

Monad

Monad (an unfortunate codename from greek philosophy meaning "indivisible unit") has me excited. It's the "new command shell" from MSFT. You may have heard of it by now, some have said "like unix"... I think I'll say it's "like a .net shell".

How so? Think classes passing objects from one to the other, perhaps giving a UI, taking input, or performing actions - all in managed code (.net). Hmm, you say, isn't that like any application? Yes! One exception only - you string together the classes (called "commandlets") that will get executed at the command line, passing in attributes for each class, and implicitly giving the order in which to execute them.

get/process | sort "handles"  | out/xml

Okay, perhaps not excatly right syntax, but pretty close. What this will do is instantiate an object of the managed class that (with attributes) says it provides the commandlet get/process. It will then call special methods on that class, and pass the output object (in this case an array of System.ProcessInfo objects) to the next object - the one that provides "sort".

Awesome. simply awesome. The ease of extensibility for us .net developers is great. Option processing and validation is provided by the shell, and not by the commandlet developer. I can't wait to learn more.

Published Oct 29 2003, 07:16 PM by philipr
Filed under:

Comments

 

JosephCooney said:

My cranky unix DBA co-workers would laugh their asses off it I told them this feature was new in longhorn.
October 29, 2003 9:54 PM
 

Michael Arnoldus said:

A monad is a concept originally from Category Theory, which is extensively used in Functional Programming (especially Haskell), which does exactly what you describe - string together a set of stateful computations.
See http://www.abercrombiegroup.co.uk/~noel/research/monads.html
October 30, 2003 4:36 AM
 

Philip Rieck said:

Michael: great link, exactly the concept that the new shell uses - I see why they call it Monad.

JosephCooney: Having developed on SCO and BSD, I'm still not laughing. While windows has lagged way (WAY) behind on shell, I think that the new shell has good potential to leapfrog what is currently available through ksh, bash, csh. I'm keeping my eyes open, but even if it only plays catch-up, at least windows will catch up.
October 30, 2003 2:29 PM
 

TrackBack said:

Doubt's log
October 31, 2003 11:59 AM
 

stefan demetz said:

April 24, 2004 2:57 PM
 

Charleston said:

The word "monad" was used before by Leibniz.
August 4, 2004 2:19 PM

Leave a Comment

(required)  
(optional)
(required)  
Add