Sadek Drobi’s Blog

March 29, 2009

Abstraction for People: Configurations, Patterns, DSLs and Monads

DSC_2692a3

LinQ is often understood in terms of introducing a Domain Specific Language to work with data to C# and .Net in general. The fact is:it is not, and there is a considerable difference between LinQ syntax nature and a DSL. The problem is that DSL definition is blur enough to take anything interesting or cool under it!

(more…)

March 5, 2009

Erik Mejier: LinQ, Beyond List Comprehensions in C# and .Net

Filed under: DOTNET, DSL, Functional Programming, Haskell, InfoQ, LinQ — Sadache @ 9:55 pm

Erik Meijer talks about less known LINQ features, like meta programming, about the differences between functional languages and OO ones, asynchronous computation, and others.

(more…)

February 3, 2009

Quiz:: SharpLight |> What does this do?

combination

January 19, 2009

Quizz:: SharpLight |> What does this do?

Filed under: DOTNET, DSL, F#, Functional Programming, Haskell, Productivity, sharplight, web 2.0 — Sadache @ 10:40 am

div <<
          a "sadekdrobi.com"  
                   << img "http://is.gd/gqVX"
          ++ "my lil’ friend"

December 7, 2008

External DSLs: Success and Failure Factors

Filed under: DSL — Sadache @ 9:31 pm

Given the growing interest in Domain Specific Languages, Michael Feathers provides some reflections on external DSLs, their advantages and pitfalls as well as possible success and failure factors that he believes to be function of far more than the technology.

(more…)

November 10, 2008

RefX:: ORMs, Relational Data, Mismatch, LinQ and DSLs

Raw00078 Raw00170 DSC_0191

Having worked with several Object-Relational mapping frameworks in the last few years, I got to a point where I couldn’t justify their complexity in my project. We often talk about the mismatch between the database and the object worlds, and that is where ORMs are often stated and referenced for “bridging the gap”!

Well I prefer to call it lifting the gap, or highering the gap, to have it now between DAOs and the rest of the code than having it between database and code.But I wouldn’t call this in any way reducing the gap.

(more…)

October 28, 2008

Ted Neward on Present and Past Languages

This is an interview I did at QCon with Ted Neward. Talking to Ted was very interesting even though arguing with him turned to be not easy at all :)

April 20, 2008

And Design Patterns suddenly Degrade!

Filed under: Architecture, C#, DSL, Functional Programming, Haskell, LinQ — Sadache @ 9:25 pm

Lately I’ve been writing some programs with Haskell (a pure functional programming language) and I noticed that I am not using GoF design patterns anymore, and that got me to a question: What are GoF design patterns? And why do we need them?

This actually reminds me of a good definition I read (I can’t recall where) of these design patterns: Resolutions to programming language limitations implemented using the programming language available syntax. When one learns a programming language, he learns to express what he wants to express using a very limited set of expressions of the language. The problem with this is that his imagination in this environment gets boxed! So what are GoF design patterns?

Most of GoF design patterns are inspired from Smaltalk, so what is so special about Smaltalk? Closures! It turns out that Java and C++ didn’t have closures and higher order functions. Some of the Design Patterns came to rescue and provide "alternatives" to these powerful constructs or workarounds  to resolve these limitations. Such an approach requires a kind of object gymnastics and results in an explosion of classes!

I am now on a project where I use C# 3.5 features, and guess what? Suddenly I use much less strategies, much less templates. I write much less code yet being as or even more flexible. Powerful lambda expressions!

Update: DSLs also come from fp paradigm!

March 28, 2008

Insights: You don’t need your DSL to be English-like

Filed under: Agile Programming, DSL, Domain Driven Design, Useability — Sadache @ 7:49 pm

There is a widespread opinion that a good DSL has to be English-like. Dave Thomas advocates against such approach asserting that DSL are not about getting as close as possible to natural languages and that having this as a guiding principle of DSL design can be rather detrimental. He also highlights what he believes is important in DSL design and provides some examples of successful DSL.

(more…)

January 18, 2008

Refex:: Does code become better as it approaches English?

Filed under: Agile Programming, Architecture, DSL — Sadache @ 5:50 pm

Achieving readability and expressiveness by writing English-like code is one of the trends on the rise in today’s industry. Michael Feathers advocates for considering other alternatives that can be instrumental for improving code expressiveness. He argues that in some circumstances symbolic approach is more appropriate than the narrative one and highlights some trades-offs between them.

(more…)

Older Posts »

Powered by WordPress