FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Minor typos

 
Post new topic   Reply to topic     Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
skotku



Joined: 23 Aug 2007
Posts: 2
Location: Sweden

PostPosted: Thu Aug 23, 2007 11:58 am    Post subject: Minor typos Reply with quote

Hi!

Here's some constructive feedback at yall tutorial editors.. I'll join in writing tutorials when I get the feel of D.

Heres the thing.. I really can not help but to notice some typos in the tutorials. Maybe there should be a topic about correcting the example code tutorials as far as possible?

In the tutorial section Intermediate .. first tutorial Character Initial Values

at the bottom ...

if(wchar.init == 0x0000FFFF)
writefln("DMD 0.93+ dchar.init.");

should be a

if(dchar.init == 0x0000FFFF)
writefln("DMD 0.93+ dchar.init.");

since the above line handled that case. I know, now you all think ah man big deal... I know it aint but still..

And in the Design Patterns section .. in the second example .. I believe it should read

class Bar : ISingleton
{
public static Bar instance()
{
....
}

protected this()
{
}

private static Bar _instance;
}

again .. wow big deal ! but I believe it is a good thing if the tutorials compile without warnings. Its just confusing. as per example..

p42.d(50): Error: need 'this' to access memeber _instance

I'm writing my way through the tutorials to get the feel of D. I hope you guys at the D Programming Language Conference in Seattle Amazon .. make good progress today and tomorrow Smile
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Thu Aug 23, 2007 3:56 pm    Post subject: Reply with quote

Actually that one in the Singleton was a legitimate typo. Smile Fixed now. Thanks for pointing it out. Feel free to continue doing so as you go along!

Edit:
Furthermore, I spotted another small typo ("instace" -> "instance"), and updated the singleton-mixin sample code to make use of 'typeof(this)' which simplifies things a little. ("mixin MSingleton;" rather than "mixin MSingleton!(Foo);")
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group