Re: Effective D book?

2013-06-16 Thread Walter Bright
On 6/16/2013 1:36 PM, Jonathan M Davis wrote: I tend to worry about things like how paragraphs are separated and which words get emphasized as I go along (the same sorts of things that I'd worry about in a simple forum post), but I'm not going to worry about minute formatting details like mdash o

Re: Effective D book?

2013-06-16 Thread H. S. Teoh
On Sun, Jun 16, 2013 at 07:58:20AM -0400, Andrei Alexandrescu wrote: > On 6/15/13 11:55 AM, H. S. Teoh wrote: > >I'm curious about how you manage to factor out / abstract away the > >niggling details of LaTeX, like the use of ".\ " after an > >abbreviation (to make it produce only an inter-word spa

Re: Effective D book?

2013-06-16 Thread Jonathan M Davis
On Sunday, June 16, 2013 09:53:55 Walter Bright wrote: > On 6/15/2013 3:19 PM, Jonathan M Davis wrote: > > For the book that I'm working on, I'm really not going to worry about the > > title at this point. I'm just going to write it, and I'll worry about > > stuff > > like the title and who might p

Re: Effective D book?

2013-06-16 Thread Andrei Alexandrescu
On 6/16/13 12:53 PM, Walter Bright wrote: On 6/15/2013 3:19 PM, Jonathan M Davis wrote: For the book that I'm working on, I'm really not going to worry about the title at this point. I'm just going to write it, and I'll worry about stuff like the title and who might publish it or anything along

Re: Effective D book?

2013-06-16 Thread Peter Alexander
On Sunday, 16 June 2013 at 16:48:46 UTC, Walter Bright wrote: On 6/16/2013 2:06 AM, Peter Alexander wrote: It std.stdio contains a symbol called "message" then this will not print "Hello, world". Yes, it will. Current scope overrides imported scope. Sorry, bad example: string message = "He

Re: Effective D book?

2013-06-16 Thread Walter Bright
On 6/15/2013 3:19 PM, Jonathan M Davis wrote: For the book that I'm working on, I'm really not going to worry about the title at this point. I'm just going to write it, and I'll worry about stuff like the title and who might publish it or anything along those lines once it's much closer to comple

Re: Effective D book?

2013-06-16 Thread Walter Bright
On 6/16/2013 2:06 AM, Peter Alexander wrote: On Saturday, 15 June 2013 at 23:36:35 UTC, Walter Bright wrote: On 6/15/2013 2:34 PM, Timon Gehr wrote: It sure is, the module system is supposed to provide hijacking protection. Inner scopes override outer scopes. That isn't what hijacking is. I

Re: Effective D book?

2013-06-16 Thread Peter Alexander
On Sunday, 16 June 2013 at 12:52:52 UTC, Andrei Alexandrescu wrote: On 6/16/13 5:34 AM, Timon Gehr wrote: The local import therefore hides a local symbol. Yah that's a bug. Has anyone filed it yet? Timon has filed that the behaviour is underspecified: http://d.puremagic.com/issues/show_bug.

Re: Effective D book?

2013-06-16 Thread Andrei Alexandrescu
On 6/16/13 5:34 AM, Timon Gehr wrote: On 06/16/2013 11:03 AM, Peter Alexander wrote: On Saturday, 15 June 2013 at 21:30:50 UTC, Timon Gehr wrote: So does this: void main(){ void writeln(string) {} writeln("foo"); { import std.stdio; writeln("bar"); } } Still not seeing any issue. The first w

Re: Effective D book?

2013-06-16 Thread Tyro[17]
On 6/16/13 6:07 AM, Timon Gehr wrote: On 06/16/2013 11:50 AM, Tyro[17] wrote: On 6/16/13 5:34 AM, Timon Gehr wrote: Should be fixed for those not willing to use the mechanism currently available to resolve the issue, but I wouldn't loose any sleep if it weren't. There is no mechanism in pl

Re: Effective D book?

2013-06-16 Thread Andrei Alexandrescu
On 6/15/13 6:19 PM, Jonathan M Davis wrote: For the book that I'm working on, I'm really not going to worry about the title at this point. I'm just going to write it, and I'll worry about stuff like the title and who might publish it or anything along those lines once it's much closer to completi

Re: Effective D book?

2013-06-16 Thread Andrei Alexandrescu
On 6/15/13 11:55 AM, H. S. Teoh wrote: I'm curious about how you manage to factor out / abstract away the niggling details of LaTeX, like the use of ".\ " after an abbreviation (to make it produce only an inter-word space, as opposed to the extra space at the end of a sentence), ABBRDOT = .\$(S

Re: Effective D book?

2013-06-16 Thread Rainer Schuetze
On 15.06.2013 17:09, Peter Alexander wrote: On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local symbols. Can you give an example? I can't repro. Here is another example I recently stumbled upon: / module a; class A {

Re: Effective D book?

2013-06-16 Thread Timon Gehr
On 06/16/2013 11:50 AM, Tyro[17] wrote: On 6/16/13 5:34 AM, Timon Gehr wrote: void main(){ void writeln(string) {} writeln("foo"); { import std.stdio; writeln("bar"); } } void main(){ void writeln(string) {} writeln("foo"); { import

Re: Effective D book?

2013-06-16 Thread Tyro[17]
On 6/16/13 5:34 AM, Timon Gehr wrote: void main(){ void writeln(string) {} writeln("foo"); { import std.stdio; writeln("bar"); } } void main(){ void writeln(string) {} writeln("foo"); { import io = std.stdio; writeln("bar");

Re: Effective D book?

2013-06-16 Thread Timon Gehr
On 06/16/2013 11:03 AM, Peter Alexander wrote: On Saturday, 15 June 2013 at 21:30:50 UTC, Timon Gehr wrote: So does this: void main(){ void writeln(string) {} writeln("foo"); { import std.stdio; writeln("bar"); } } Still not seeing any issue. The first writeln

Re: Effective D book?

2013-06-16 Thread Jonathan M Davis
On Sunday, June 16, 2013 11:06:18 Peter Alexander wrote: > On Saturday, 15 June 2013 at 23:36:35 UTC, Walter Bright wrote: > > On 6/15/2013 2:34 PM, Timon Gehr wrote: > >> It sure is, the module system is supposed to provide hijacking > >> protection. > > > > Inner scopes override outer scopes. Th

Re: Effective D book?

2013-06-16 Thread Peter Alexander
On Saturday, 15 June 2013 at 23:36:35 UTC, Walter Bright wrote: On 6/15/2013 2:34 PM, Timon Gehr wrote: It sure is, the module system is supposed to provide hijacking protection. Inner scopes override outer scopes. That isn't what hijacking is. I think this is an issue Walter, consider: vo

Re: Effective D book?

2013-06-16 Thread Peter Alexander
On Saturday, 15 June 2013 at 21:30:50 UTC, Timon Gehr wrote: So does this: void main(){ void writeln(string) {} writeln("foo"); { import std.stdio; writeln("bar"); } } Still not seeing any issue. The first writeln cannot know about the import because it is at a

Re: Effective D book?

2013-06-15 Thread deadalnix
On Sunday, 16 June 2013 at 00:42:15 UTC, Timon Gehr wrote: On 06/16/2013 01:36 AM, Walter Bright wrote: On 6/15/2013 2:34 PM, Timon Gehr wrote: It sure is, the module system is supposed to provide hijacking protection. Inner scopes override outer scopes. That isn't what hijacking is. A mod

Re: Effective D book?

2013-06-15 Thread Timon Gehr
On 06/16/2013 01:36 AM, Walter Bright wrote: On 6/15/2013 2:34 PM, Timon Gehr wrote: It sure is, the module system is supposed to provide hijacking protection. Inner scopes override outer scopes. That isn't what hijacking is. A module can introduce a new symbol and silently change what some

Re: Effective D book?

2013-06-15 Thread Walter Bright
On 6/15/2013 2:34 PM, Timon Gehr wrote: It sure is, the module system is supposed to provide hijacking protection. Inner scopes override outer scopes. That isn't what hijacking is.

Re: Effective D book?

2013-06-15 Thread John Colvin
On Saturday, 15 June 2013 at 08:07:23 UTC, SomeDude wrote: On Saturday, 15 June 2013 at 03:56:50 UTC, Walter Bright wrote: Heck, to throw something out there, why not "D Best Practices"? Or "D Patterns and Practices" ? +1

Re: Effective D book?

2013-06-15 Thread Jonathan M Davis
On Sunday, June 16, 2013 01:55:35 Dmitry Olshansky wrote: > 15-Jun-2013 12:07, SomeDude пишет: > > On Saturday, 15 June 2013 at 03:56:50 UTC, Walter Bright wrote: > >> Heck, to throw something out there, why not "D Best Practices"? > > > > Or "D Patterns and Practices" ? > > With some David Simcha

Re: Effective D book?

2013-06-15 Thread David Nadlinger
On Saturday, 15 June 2013 at 21:35:20 UTC, Timon Gehr wrote: On 06/15/2013 05:09 PM, Peter Alexander wrote: On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local symbols. Can you give an example? I can't repro. void main() { imp

Re: Effective D book?

2013-06-15 Thread Dmitry Olshansky
15-Jun-2013 12:07, SomeDude пишет: On Saturday, 15 June 2013 at 03:56:50 UTC, Walter Bright wrote: Heck, to throw something out there, why not "D Best Practices"? Or "D Patterns and Practices" ? With some David Simcha content in it (if he agrees with that of course). IMHO D Cookbook sounds a

Re: Effective D book?

2013-06-15 Thread Timon Gehr
On 06/15/2013 05:09 PM, Peter Alexander wrote: On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local symbols. Can you give an example? I can't repro. void main() { import std.stdio; void writeln(string) {} writeln("foo

Re: Effective D book?

2013-06-15 Thread Timon Gehr
On 06/15/2013 05:09 PM, Peter Alexander wrote: On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local symbols. Can you give an example? I can't repro. void main() { import std.stdio; void writeln(string) {} writeln("foo

Re: Effective D book?

2013-06-15 Thread Timon Gehr
On 06/15/2013 06:06 PM, Peter Alexander wrote: On Saturday, 15 June 2013 at 15:29:23 UTC, Mr. Anonymous wrote: On Saturday, 15 June 2013 at 15:09:55 UTC, Peter Alexander wrote: On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local sym

Re: Effective D book?

2013-06-15 Thread matovitch
the 'true' link : http://stackoverflow.com/questions/17127251/effective-d-best-practices-and-design-patterns

Re: Effective D book?

2013-06-15 Thread matovitch
I am referring to the beginning of this thread, but definitly wating for such a book to come out I have open a SO question (interactive media for a yet evolving langage) about effective design patterns and best practice in D. So if you have some clever methods you want to share, I am waiting fo

Re: Effective D book?

2013-06-15 Thread matovitch
On Saturday, 15 June 2013 at 19:52:45 UTC, matovitch wrote: I am referring to the beginning of this thread, but definitly wating for such a book to come out I have open a SO question (interactive media for a yet evolving langage) about effective design patterns and best practice in D. So if you

Re: Effective D book?

2013-06-15 Thread Jonathan M Davis
On Saturday, June 15, 2013 08:55:11 H. S. Teoh wrote: > I'm curious about how you manage to factor out / abstract away the > niggling details of LaTeX, like the use of ".\ " after an abbreviation > (to make it produce only an inter-word space, as opposed to the extra > space at the end of a sentenc

Re: Effective D book?

2013-06-15 Thread Peter Alexander
On Saturday, 15 June 2013 at 15:29:23 UTC, Mr. Anonymous wrote: On Saturday, 15 June 2013 at 15:09:55 UTC, Peter Alexander wrote: On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local symbols. Can you give an example? I can't repro.

Re: Effective D book?

2013-06-15 Thread H. S. Teoh
On Fri, Jun 14, 2013 at 11:15:14PM -0400, Jonathan M Davis wrote: > On Friday, June 14, 2013 19:57:52 Walter Bright wrote: > > > Interestingly enough, based on Andrei's suggestions, I'm writing > > > it using ddoc so that it can easily be converted into latex, html, > > > and e-book formats rather

Re: Effective D book?

2013-06-15 Thread Mr. Anonymous
On Saturday, 15 June 2013 at 15:09:55 UTC, Peter Alexander wrote: On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local symbols. Can you give an example? I can't repro. void main() { import std.stdio; void writeln(str

Re: Effective D book?

2013-06-15 Thread Peter Alexander
On Saturday, 15 June 2013 at 12:20:46 UTC, Timon Gehr wrote: One issue with local imports is that they hide local symbols. Can you give an example? I can't repro. void main() { import std.stdio; void writeln(string) {} writeln("foo"); std.stdio.writeln("bar"); }

Re: Effective D book?

2013-06-15 Thread Timon Gehr
On 06/15/2013 03:02 AM, Walter Bright wrote: On 6/14/2013 11:29 AM, monarch_dodra wrote: In particular, while *stable*, it *is* still "evolving", which means that while the old code still works, the patterns are still shifting. One example of that is Andrei and I have been discussing the idea

Re: Effective D book?

2013-06-15 Thread SomeDude
On Saturday, 15 June 2013 at 03:56:50 UTC, Walter Bright wrote: Heck, to throw something out there, why not "D Best Practices"? Or "D Patterns and Practices" ? With some David Simcha content in it (if he agrees with that of course).

Re: Effective D book?

2013-06-15 Thread Jonathan M Davis
On Saturday, June 15, 2013 00:26:55 Ali Çehreli wrote: > On 06/14/2013 07:17 PM, Jonathan M Davis wrote: > > It'll probably be the first book ever to be written entirely in ddoc. > > The first ddoc book was a D book as well: ;) > > > http://code.google.com/p/ddili/source/browse/trunk/src/ders/d

Re: Effective D book?

2013-06-15 Thread Ali Çehreli
On 06/14/2013 07:17 PM, Jonathan M Davis wrote: > It'll probably be the first book ever to be written entirely in ddoc. The first ddoc book was a D book as well: ;) http://code.google.com/p/ddili/source/browse/trunk/src/ders/d.en/foreach_opapply.d Ali

Re: Effective D book?

2013-06-14 Thread Andrei Alexandrescu
On 6/15/13 5:43 AM, Szymon Gatner wrote: Btw: Not sure if "effective" series isn't somehow propertiary and linked to Herb Sutter. I know he is not only responsible for c++ but also for c# version The "Effective" series at AWL is directed by Scott Meyers and would not preclude one from using th

Re: Effective D book?

2013-06-14 Thread Walter Bright
On 6/14/2013 8:43 PM, Szymon Gatner wrote: Btw: Not sure if "effective" series isn't somehow propertiary and linked to Herb Sutter. I know he is not only responsible for c++ but also for c# version I would refrain from naming it "Effective D". Scott Meyers is the author of several "Effective C

Re: Effective D book?

2013-06-14 Thread Jonathan M Davis
On Saturday, June 15, 2013 05:43:11 Szymon Gatner wrote: > Btw: Not sure if "effective" series isn't somehow propertiary and > linked to Herb Sutter. I know he is not only responsible for c++ > but also for c# version Scott Meyers wrote the C++ one, Bill Wagner wrote the C# one, and Joshua Bloch

Re: Effective D book?

2013-06-14 Thread Szymon Gatner
On Saturday, 15 June 2013 at 02:17:59 UTC, Jonathan M Davis wrote: On Friday, June 14, 2013 20:29:09 monarch_dodra wrote: On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: > Any plans on that now that language is stable enough? Andrei > authoring maybe? Who would write it? I'm a b

Re: Effective D book?

2013-06-14 Thread Walter Bright
On 6/14/2013 8:15 PM, Jonathan M Davis wrote: My one major complaint about using ddoc is the need for the $(P ) macro everywhere, whereas LaTeX inserts paragraphs based on empty lines. I should probably create an enhancement request for that (and maybe even try and implement it), but I have enoug

Re: Effective D book?

2013-06-14 Thread Jonathan M Davis
On Friday, June 14, 2013 19:57:52 Walter Bright wrote: > > Interestingly enough, based on Andrei's suggestions, I'm writing it using > > ddoc so that it can easily be converted into latex, html, and e-book > > formats rather than being tied to any particular format (I was going to > > use latex, bu

Re: Effective D book?

2013-06-14 Thread Walter Bright
On 6/14/2013 7:17 PM, Jonathan M Davis wrote: I'm a bit reticent to bring it up given that I won't be done anytime soon, but I actually started writing such a book following DConf. After Andrew brought up the possibility of Effective D in his talk and all of the talk that occurred at DConf about

Re: Effective D book?

2013-06-14 Thread Elvis
On Saturday, 15 June 2013 at 02:17:59 UTC, Jonathan M Davis wrote: On Friday, June 14, 2013 20:29:09 monarch_dodra wrote: On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: > Any plans on that now that language is stable enough? Andrei > authoring maybe? Who would write it? I'm a b

Re: Effective D book?

2013-06-14 Thread Jonathan M Davis
On Friday, June 14, 2013 20:29:09 monarch_dodra wrote: > On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: > > Any plans on that now that language is stable enough? Andrei > > authoring maybe? > > Who would write it? I'm a bit reticent to bring it up given that I won't be done anytime

Re: Effective D book?

2013-06-14 Thread Walter Bright
On 6/14/2013 11:29 AM, monarch_dodra wrote: In particular, while *stable*, it *is* still "evolving", which means that while the old code still works, the patterns are still shifting. One example of that is Andrei and I have been discussing the idea of moving import declarations from their trad

Re: Effective D book?

2013-06-14 Thread H. S. Teoh
On Fri, Jun 14, 2013 at 11:22:14PM +0200, monarch_dodra wrote: > On Friday, 14 June 2013 at 19:38:10 UTC, Peter Alexander wrote: > >On Friday, 14 June 2013 at 18:29:10 UTC, monarch_dodra wrote: > >>On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: > >>>Any plans on that now that languag

Re: Effective D book?

2013-06-14 Thread monarch_dodra
On Friday, 14 June 2013 at 19:38:10 UTC, Peter Alexander wrote: On Friday, 14 June 2013 at 18:29:10 UTC, monarch_dodra wrote: On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: Any plans on that now that language is stable enough? Andrei authoring maybe? Who would write it? Did y

Re: Effective D book?

2013-06-14 Thread Szymon Gatner
On Friday, 14 June 2013 at 19:38:10 UTC, Peter Alexander wrote: On Friday, 14 June 2013 at 18:29:10 UTC, monarch_dodra wrote: On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: Any plans on that now that language is stable enough? Andrei authoring maybe? Who would write it? Did y

Re: Effective D book?

2013-06-14 Thread Peter Alexander
On Friday, 14 June 2013 at 18:29:10 UTC, monarch_dodra wrote: On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: Any plans on that now that language is stable enough? Andrei authoring maybe? Who would write it? Did you read what you quoted? :-)

Re: Effective D book?

2013-06-14 Thread Walter Bright
On 6/14/2013 11:29 AM, monarch_dodra wrote: Who would write it? Anyone who wants to! It seems to me that D is still new and not widespread, which means that everybody has their own styles and interpretation of how to use the language. I could see someone writing a "Programming with Phobos" b

Re: Effective D book?

2013-06-14 Thread monarch_dodra
On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: Any plans on that now that language is stable enough? Andrei authoring maybe? Who would write it? It seems to me that D is still new and not widespread, which means that everybody has their own styles and interpretation of how to

Re: Effective D book?

2013-06-14 Thread Walter Bright
On 6/14/2013 8:56 AM, Peter Alexander wrote: On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: Any plans on that now that language is stable enough? Andrei authoring maybe? The language is fairly stable, but still far from complete. There's still several unimplemented and undesigne

Re: Effective D book?

2013-06-14 Thread Peter Alexander
On Friday, 14 June 2013 at 15:38:02 UTC, Szymon Gatner wrote: Any plans on that now that language is stable enough? Andrei authoring maybe? The language is fairly stable, but still far from complete. There's still several unimplemented and undesigned big features that could significantly affe

Effective D book?

2013-06-14 Thread Szymon Gatner
Any plans on that now that language is stable enough? Andrei authoring maybe?