Title Image

Don Xml's Grok This

The home of Don Demsak
Welcome to Don Xml's Grok This Sign in | Help
in Search

This Blog

Syndication

Site Sponsors

DonXml's All Things Techie

Mixing Object, Functional and Aspect Oriented Programming

I spent the last week in Seattle and Redmond, attending both the MVP Summit and the ALT.Net Conference, and spent the majority of time discussing the future of programming, both on the .Net platform and other platforms.  By Saturday night, my brain was pretty much on extreme overload.  One of the things I've been doing a lot of over the last few months is pondering the effect of mixing functional programming with object oriented programming.  I've learned that functional programming twists your developer mindset.  For years, I've been using object oriented programming, and have developed the habit of thinking objects, first.  Functional programming tends to get you thinking in terms of, well, functions, first.  I've also been thinking a lot about Domain Specific Languages (both internal and external), and how they map to our traditional programming paradigms.  So, late last night, my brain popped out this little nugget:

Within a DSL it would be cool if you could map its Nouns to Objects (described via OOP), its Verbs to Functions (described via FP), and its Adjectives and Adverbs to Aspects (via AOP).

I have to do some research, but does this fit within the definition of a composable language?  I tried to fine a definition of what a composable language, but didn't seem to find one.

Published Sunday, April 20, 2008 11:57 PM by donxml

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

O'Reilly XML Blog said:

SIDE NOTE: @amike: The run was good while it lasted, eh? ;-) --- DonXml's All Things Techie : Mixing Object, Functional and Aspect Oriented Programming I spent the last week in Seattle and Redmond, attending both the MVP Summit and...
April 21, 2008 8:19 AM

J. Ambrose Little said:

Very interesting idea, Don. Keep fleshing it out; I'd like to see how it develops.
April 21, 2008 1:58 PM

donxml said:

David, yes, I should have mentioned that XSLT and XPath are composable languages (says so right in the XPath spec), which is probably where I got the idea from.  But, I'm trying to go beyond XML, XSLT, & XPath and mix various languages, in the same "class" (aka the language's minimum structure), and have each one do what it does best.  So, something like, using C#, F# and Ruby to create one "class".

April 21, 2008 2:03 PM

Shawn Wildermuth said:

Don, I am in the same boat. I've been deep into Functional languages since I got back from Seattle. I found a cool video by Martin Fowler on DSL's: http://www.infoq.com/presentations/domain-specific-languages as well as Ted Neward and Mark Miller on Functional Languages: http://www.informit.com/podcasts/episode.aspx?e=E5AAF8FB-9502-4FC4-AB97-1F9D309FF5CE
April 21, 2008 3:23 PM

Greg Young said:

Are these actually provided already in messaging systems (not necessarily SOA) I have end points that expose a contract these can be seen as nouns. I have messages that get passed to them let's say "AddAddress" or "SendEmail" that are verbs I have my pipeline which can be decorated to provide AOP type functionality (your adverbs). Given the concept of mixins (adjectives) doesn't really work here but there is argument whether they are a good thing or a bad thing. If you built up a DSL on top of a messaging system would it not implement these behaviors?
May 2, 2008 4:57 PM

Chuck Kraatz said:

OK my friend...you are seeing the light once again. Remember how I blasphemed and said OO was not the end all do all. How I said it was a tool while many thought it was the last great idea. Well you thoughts as stated here is really just stating "That is how the human brain works". No matter what we may call this 'stuff' that is how it works and basically people "Function". The objects are simply tools and their point of view is fluid but the functions of life are usually definable and consistent across vast boundaries. So keep thinking this out, maybe programming will get it right in my life time. BTW I'm not sure one class is possible, but groups of perspectives upon a given class and it functional capabilities are.... There may not be a silver bullet as even people have 'opinions' and that really messes up the clarity. Thanks Chuck
May 14, 2008 12:34 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About donxml

I’m an independent consultant, specializing in .Net solutions architecture, based out of New Jersey who also doubles as an evangelist for XML, Domain Driven Design, enterprise architecture and .Net. I do not work for Microsoft, the W3C or any other big company that you may know of (at least not yet). I’ve been an indie for over ten years, and although I’ve been tempted a couple times to take a job with companies like Microsoft, I’ve haven’t found something better than my current situation. I work mostly with the large pharmaceuticals that are based here in New Jersey, and usually find myself on long term contracts. Definitely not the prototypical indie consultant, but it lets me dedicate time to my non-income generating activities like the developer community stuff, plus financing open source projects like XPathmania and MVP-XML. If you would like to talk to me about doing some contract work, just contact me via the contact page. My rates vary widely, depending on lots of different variables, but mostly distance from Jersey, and type of work. Plus, I’ve been known to donate some of my code for various projects.
Powered by Community Server, by Telligent Systems