Monday, March 10, 2003

Jon Udell is right. The problem with writing for the web isn't that there are no editors, the problem is that your editors speak up only after you've stuck your foot in your mouth, as I just did when I labeled scope and polymorphism as design patterns. Jesse wasn't having any and neither was Dare (via email). Let me try again.

The best example I can think of that would be accessible to most everybody is the C# delegate keyword as a way the C# language supports the Observer pattern. foreach offers a more sugary way to iterate over classes that implement a specific interface. Another possible example would be Lisp's mapcar function, which takes a function and a list and applies the function to every element in the list, returning a list of the values returned by each function invocation. Here's how you could test if the symbol a is in the list (a b c):

 
>(mapcar #'(lambda (x) (eql x 'a)) '(a b c) ) 
(T NIL NIL) 
My point here is that you don't have to wait for the next release of C# or Java, or hack the Rotor sources, to find languages that support higher level constructs.

3:47:14 PM  permalink Click here to send an email to the editor of this weblog. 

Jesse Ezell is wondering why "there isn't more support for design patterns at the language or framework level in any language". If you restrict "design patterns" to GoF design patterns, some languages do provide support, you just have to look at the right lanugages. There was a discussion on this going around about a month ago, John Wiseman aggregated the links. When you think about it, C# actually implements a lot of design patterns for you, they're just generally too low level to conciously acknowlege. Aren't concepts like "scope" and "polymorphism" design patterns?

Wes Haggard also has a post about the Self Write programming challenge. This is another task that's a lot easier, to the point of trivial, depending what language you implement it in.

11:46:41 AM  permalink Click here to send an email to the editor of this weblog. 


Stories
DateTitle
1/23/2003 Why XML?
8/13/2002 Resolution for IE and Windows problems
8/10/2002 Supporting VS.NET and NAnt
5/11/2002 When do you stop unit testing?
Contact
jabber: weakliem
YM: gweakliem
MSN: gweakliem@pcisys.net
email: Click here to send an email to the editor of this weblog.
Subscribe to "Gordon Weakliem's Weblog" in Radio UserLand.
Click to see the XML version of this web page.