More keywords? Or fewer?

Walter Bright newshound1 at digitalmars.com
Fri May 2 14:09:25 PDT 2008


Me Here wrote:
> There is a lesson to be learnt here. And it goes right back to the 
> original mission statement for D's design philosophy. In a word: 
> pragmatism.

I think your post makes it pretty clear that a pure functional, or pure 
inference, or pure anything language means it works well only if the 
particular programming problem falls 100% into that domain. It's like 
trying to do math when the only operation you have available is '+'.

The idea in D is that when your program needs to switch gears, it can do 
so while remaining in the same language, and without horrible kludges. 
This means that D will support functional, procedural, safe, unsafe, 
OOP, imperative, metaprogramming, etc., styles fairly seamlessly under 
one umbrella.

The downside is the language can become a bit kitchen-sinkish, but the 
upside is much larger. Look at the awful lengths people go to to mix 
Python and C++, for example. Or Erlang and C. Or Java and C++.

Languages that hew to the purity of one particular style tend to spawn 
evangelists and apologists for the One True Way who tie themselves into 
knots trying to prove that, for example, OOP fits every problem.

While C++ merges OOP and procedural (thereby deriving a huge benefit), I 
don't know of a language that merges functional with procedural. D is 
certainly going to give it a try.



More information about the Digitalmars-d mailing list