View previous topic :: View next topic |
Author |
Message |
skotku
Joined: 23 Aug 2007 Posts: 2 Location: Sweden
|
Posted: Thu Aug 23, 2007 11:58 am Post subject: Minor typos |
|
|
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 |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Thu Aug 23, 2007 3:56 pm Post subject: |
|
|
Actually that one in the Singleton was a legitimate typo. 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 |
|
|
|