Home » Community » Forums » Nehe News » NeHe tutorials ported to D
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

NeHe tutorials ported to D

D is an up and coming language that aims to take the power of C++ and make it better. From the D site:

Its [D's] focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python.

More information can be found here and here. Although immature, its ability to link to C means it can link to many existing libraries including OpenGL and SDL...

Olli Aalto has been busy porting the majority of the original NeHe lessons to D and SDL!!! His ports and tutorials can be found on his blog. Definitely worth a look!!!


ADVERTISEMENT

 previous story  next story 
 "NeHe tutorials ported to D" Discussion
Post Reply 
No bad tutorials, Thanks for this info.

software reviews | latest games

  User Rating: 1015   |  Rate This User   Send Private MessageView ProfileReport this Post to a Moderator | Link

No bad tutorials, Thanks for this info.

  User Rating: 1015   |  Rate This User   Send Private MessageView ProfileReport this Post to a Moderator | Link

Quote:
/*
* Finally, we can compute our factorials. Notice that we don't need to
* specify the type of our constants explicitly: the compiler is smart enough
* to fill in the blank for us, since it already knows the type of the
* right-hand side of the assignment.
*/
const fact_7 = Factorial!(7);


I already hate this language just by reading that.

  User Rating: 1245   |  Rate This User   Send Private MessageView ProfileReport this Post to a Moderator | Link

Quote:
Original post by V-man
Quote:
/*
* Finally, we can compute our factorials. Notice that we don't need to
* specify the type of our constants explicitly: the compiler is smart enough
* to fill in the blank for us, since it already knows the type of the
* right-hand side of the assignment.
*/
const fact_7 = Factorial!(7);


I already hate this language just by reading that.


While auto type inference is supported by D, it is not a requirement. You can explicitly specify the types just as you can in C and C++ if you want. D's auto type inference is very useful for templates and other specific cases. It's done at compile-time, not runtime.



  User Rating: 1462   |  Rate This User   Send Private MessageView ProfileReport this Post to a Moderator | Link

Nice to see so many of Nehe's tutorials ported to D.

Quote:
Original post by V-man
Quote:
/*
* Finally, we can compute our factorials. Notice that we don't need to
* specify the type of our constants explicitly: the compiler is smart enough
* to fill in the blank for us, since it already knows the type of the
* right-hand side of the assignment.
*/
const fact_7 = Factorial!(7);


I already hate this language just by reading that.


Really? Why?

It isn't a big deal to insert the type here, but when you can say 'auto i = ...' instead of 'vector<int>::iterator i == ...' it is quite helpful. And that's just one of the less verbose use cases. Besides, it helps to make code more generic. Anyway, YMMV I guess.



  User Rating: 1283   |  Rate This User   Send Private MessageView ProfileReport this Post to a Moderator | Link

All times are ET (US)

Post Reply
 previous story  next story 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: