C++ to D: Help please

Tyro[a.c.edwards] nospam at home.com
Thu Feb 24 12:39:29 PST 2011


On 2/25/2011 3:33 AM, Jesse Phillips wrote:
> Well using one language you aren't familiar with to learn another is probably not the best strategy.
>
> For one thing C++ uses namespaces and D uses modules. They are both about name-space but are very different approaches. If you want to learn about modules then write a simple application. Place all functions in one module/file and import that into a file that contains the main function. Then call $ dmd file1.d file2.d

Right again. It would be great to have complete tutorials for D. But the 
fact is we don't, so one has little choice but to use another language's 
tutorial. Truth be told, I was hoping that Bartosz Milewski, a very 
active programmer in the D community would see my post and, would 
realize that I was using his tutorials and offer to port them to D so 
that the community as a whole would benefit from them. I've gotten away 
of trying to ask authors directly to convert their material to D because 
that rarely ever works.

As far as learning the differences between C++ and D, I really have no 
desire. I'm what you might call an advanced beginning D programmer. Lost 
but not dumb: I do know how the D module system works and I have an 
inkling of how C++ namespaces work. I know the basics of programming (in 
D language, but the basics translate to any other language quite easily) 
and am looking for ways to use that to do something useful. 
Unfortunately, the more complete/useful tutorials are written in C/C++ 
and not my language of choice: D. The authors of those tutorials have no 
interest in D or probably have never even heard of D and would care less 
about it's existence because it does not positively affect their 
financial well being.

I will eventually port the program, because that is what I want to do. 
But the fact is, that will take several months using a trial and error 
approach. I was just hoping to get through the process a little faster 
and learning from that example, go ahead and port the rest of the 
tutorials on Bartosz's site. Sorry for assuming someone would be willing 
to offer to lend a hand in doing so. I would offer to compensate that 
individual for time lost doing the conversion but I have no idea what 
would be a reasonable offer and refrained from doing so because I had no 
desire to offend anyone here.

Well, thank you all.


More information about the Digitalmars-d-learn mailing list