Unofficial wish list status.(Jul 2008)

Bill Baxter dnewsgroup at billbaxter.com
Tue Jul 22 07:25:41 PDT 2008


maelp wrote:
> Sean Kelly wrote:
>> I think part of the problem is that I simply don't agree with the mixed
>> functional / imperative approach that appears to be the overarching
>> direction of D.
> 
> Walter Bright replied:
>> No other language has tried such an approach before, and so we have yet 
>> to know unequivocably if it is right or not. But I'm very optimistic 
>> about it.
> 
> Ever heard of Objective Caml? 
> Not to be mean, but I guess it was there (and mixing functional, oop and imperative) first. Basically, I'd said functional programming in OCaml is *very* elegant and powerful, their use of functional instructions is a bit clumsy, and their oop is mostly unusable (mainly because they constantly "patch" their programming languages with new  features, basically, each time there's a PhD student trying to work on functionnal programming .. )
> 
> Try to have a look at their way of mixing all this, if you haven't done that yet.. ?
>  

That's not the same approach at all.  It's more like the opposite 
approach -- grafting a procedural sublanguage on top of a functional 
language rather than what D is doing, putting a functional subset atop a 
procedural base.

I believe Walter's premise is that most of the time people are more 
comfortable working in a procedural/oo style.  But for certain tasks a 
functional approach is better.  I agree.  I tried to use OCaml.  It 
sounds great on paper, and I had heard Chris Hecker singing its praises 
once, but like you said "their oop is mostly unusable".  I figured it 
might eventually make sense and not seem so clumsy if I spent enough 
time with it, but then there was D sitting there saying "halloo! no 
troubles with my oo or procedural style here!  You can get going right 
away with no steep learning curve!"  So I went with D in the end.  But I 
seriously had decided at one point that I was going to make OCaml my C++ 
replacer.  And then I sat down to see how I would write a simple model 
viewer or something and was just stuck for days trying to figure out how 
to begin to get anything up on the screen.  And the library situation 
didn't seem to be particularly good either, at least for Windows IIRC.

So basically, I think D's approach is quite different from OCaml's, and 
more likely to succeed.

--bb



More information about the Digitalmars-d mailing list