www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Clearly Label D1/D2/Tango/Phobos

reply "Paul" <phshaffer gmail.com> writes:
I bought the book and am trying to patiently learn this language. 
  I follow various tutorials here and around the web that 
frequently won't compile.  I suspect it has something to do with 
D1/D2/Phobos/Tango and not just really poor unvetted tutorials.  
It would really be helpful if those providing references, code 
snippets, tutorials, etc clearly identify the context (i.e 
D1/D2/Phobos/Tango).  I just think it would help accelerate the 
spread and acceptance of this language if more of the code worked 
as listed.

If people are out cruising the web and download a fresh copy of D 
with excitement (about a cleaned-up, updated c-type systems 
language) and then the first several things don't compile w/o 
errors, they're going to move on.

Thanks so much to all who provide references, tutorials, etc!  It 
is great service in helping others learn.  I hope this is seen as 
constructive criticism for that is what it is.
Apr 18 2012
next sibling parent reply Somedude <lovelydear mailmetrash.com> writes:
Le 18/04/2012 14:34, Paul a écrit :
 I bought the book and am trying to patiently learn this language.  I
 follow various tutorials here and around the web that frequently won't
 compile.  I suspect it has something to do with D1/D2/Phobos/Tango and
 not just really poor unvetted tutorials.  It would really be helpful if
 those providing references, code snippets, tutorials, etc clearly
 identify the context (i.e D1/D2/Phobos/Tango).  I just think it would
 help accelerate the spread and acceptance of this language if more of
 the code worked as listed.
 
 If people are out cruising the web and download a fresh copy of D with
 excitement (about a cleaned-up, updated c-type systems language) and
 then the first several things don't compile w/o errors, they're going to
 move on.
 
 Thanks so much to all who provide references, tutorials, etc!  It is
 great service in helping others learn.  I hope this is seen as
 constructive criticism for that is what it is.
Hi ! It's simple: use D2, and forget about Tango. D1 is deprecated and its maintainance will be stopped by the end of the year. Noone should be starting with D1 now. You can start here: http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial I cleaned up this page a little bit, I hope this helps.
Apr 18 2012
next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Wed, Apr 18, 2012 at 04:15:12PM +0200, Somedude wrote:
 Le 18/04/2012 14:34, Paul a écrit :
 I bought the book and am trying to patiently learn this language.  I
 follow various tutorials here and around the web that frequently
 won't compile.  I suspect it has something to do with
 D1/D2/Phobos/Tango and not just really poor unvetted tutorials.  It
 would really be helpful if those providing references, code
 snippets, tutorials, etc clearly identify the context (i.e
 D1/D2/Phobos/Tango).  I just think it would help accelerate the
 spread and acceptance of this language if more of the code worked as
 listed.
dlang.org is the official source for the current version of D.
 If people are out cruising the web and download a fresh copy of D
 with excitement (about a cleaned-up, updated c-type systems
 language) and then the first several things don't compile w/o
 errors, they're going to move on.
 
 Thanks so much to all who provide references, tutorials, etc!  It is
 great service in helping others learn.  I hope this is seen as
 constructive criticism for that is what it is.
Unfortunately there isn't really a way to "deprecate" the D1-specific tutorials floating out on the web right now... we could do with more publicity for dlang.org and other up-to-date D sites, though. [...]
 It's simple: use D2, and forget about Tango.
[...] +1. T -- It is the quality rather than the quantity that matters. -- Lucius Annaeus Seneca
Apr 18 2012
prev sibling next sibling parent Jordi Sayol <g.sayol yahoo.es> writes:
Al 18/04/12 16:15, En/na Somedude ha escrit:
 Le 18/04/2012 14:34, Paul a =C3=A9crit :
 I bought the book and am trying to patiently learn this language.  I
 follow various tutorials here and around the web that frequently won't=
 compile.  I suspect it has something to do with D1/D2/Phobos/Tango and=
 not just really poor unvetted tutorials.  It would really be helpful i=
f
 those providing references, code snippets, tutorials, etc clearly
 identify the context (i.e D1/D2/Phobos/Tango).  I just think it would
 help accelerate the spread and acceptance of this language if more of
 the code worked as listed.

 If people are out cruising the web and download a fresh copy of D with=
 excitement (about a cleaned-up, updated c-type systems language) and
 then the first several things don't compile w/o errors, they're going =
to
 move on.

 Thanks so much to all who provide references, tutorials, etc!  It is
 great service in helping others learn.  I hope this is seen as
 constructive criticism for that is what it is.
=20 =20 Hi ! =20 It's simple: use D2, and forget about Tango. D1 is deprecated and its maintainance will be stopped by the end of the=
 year. Noone should be starting with D1 now.
=20
 You can start here:
 http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial
=20
 I cleaned up this page a little bit, I hope this helps.
=20
You can also take a look at: http://ddili.org/ders/d.en/index.html This is a "in progress" English translation of a Turkish book to learn D2= from scratch. You can read it on-line, or download the pdf file. --=20 Jordi Sayol
Apr 18 2012
prev sibling next sibling parent Jacob Carlborg <doob me.com> writes:
On 2012-04-18 16:15, Somedude wrote:

 Hi !

 It's simple: use D2, and forget about Tango.
What's wrong with Tango? It works with D2 and you can have it side by side with Phobos. The XML library in Tango is superior to the one in Phobos. -- /Jacob Carlborg
Apr 18 2012
prev sibling parent reply "Paul" <phshaffer gmail.com> writes:
On Wednesday, 18 April 2012 at 14:15:08 UTC, Somedude wrote:
 Le 18/04/2012 14:34, Paul a écrit :
 I bought the book and am trying to patiently learn this 
 language.  I
 follow various tutorials here and around the web that 
 frequently won't
 compile.  I suspect it has something to do with 
 D1/D2/Phobos/Tango and
 not just really poor unvetted tutorials.  It would really be 
 helpful if
 those providing references, code snippets, tutorials, etc 
 clearly
 identify the context (i.e D1/D2/Phobos/Tango).  I just think 
 it would
 help accelerate the spread and acceptance of this language if 
 more of
 the code worked as listed.
 
 If people are out cruising the web and download a fresh copy 
 of D with
 excitement (about a cleaned-up, updated c-type systems 
 language) and
 then the first several things don't compile w/o errors, 
 they're going to
 move on.
 
 Thanks so much to all who provide references, tutorials, etc!  
 It is
 great service in helping others learn.  I hope this is seen as
 constructive criticism for that is what it is.
Hi ! It's simple: use D2, and forget about Tango. D1 is deprecated and its maintainance will be stopped by the end of the year. Noone should be starting with D1 now. You can start here: http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial I cleaned up this page a little bit, I hope this helps.
I tried one "file open" example from this site and one from another site and neither compiled w/o errors. I thought perhaps I had copied some code that might have been related to a specific version of D. I was just commenting that for people who are supplying exmaples/tutorials it would help if they specified more clearly what version/genre of D their code sample works with. I have no opinion on the Phobos/Tango or deprecated features/version stuff. I just think it would help the acceptance of the language if stuff compiled as listed. As for the example from this site under std.stdio; it should compile. It's a simple program. This is the mother site. A member helped me realize that it needs "import std.stdio;" // test.d void main(string args[]) { auto f = File("test.txt", "w"); // open for writing f.write("Hello"); if (args.length > 1) { auto g = f; // now g and f write to the same file // internal reference count is 2 g.write(", ", args[1]); // g exits scope, reference count decreases to 1 } f.writeln("!"); // f exits scope, reference count falls to zero, // underlying FILE* is closed. }
Apr 18 2012
parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Thu, Apr 19, 2012 at 12:34:09AM +0200, Paul wrote:
[...]
 As for the example from this site under std.stdio; it should
 compile.  It's a simple program.  This is the mother site.
 
 A member helped me realize that it needs "import std.stdio;"
 
 
 // test.d
 void main(string args[])
 {
     auto f = File("test.txt", "w"); // open for writing
     f.write("Hello");
     if (args.length > 1)
     {
         auto g = f; // now g and f write to the same file
                     // internal reference count is 2
         g.write(", ", args[1]);
         // g exits scope, reference count decreases to 1
     }
     f.writeln("!");
     // f exits scope, reference count falls to zero,
     // underlying FILE* is closed.
 }
This is a documentation bug. Please file an issue in the bugtracker so that this can be fixed. All code examples in library documentation should compile without errors as-is, unless they are incomplete snippets, in which case they should compile in the intended context with no further modifications. If something doesn't compile, the documentation is faulty and needs to be fixed. T -- The best way to destroy a cause is to defend it poorly.
Apr 18 2012
prev sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
On 18/04/2012 13:34, Paul wrote:
 I bought the book and am trying to patiently learn this language. I follow
various
 tutorials here and around the web that frequently won't compile. I suspect it
has
 something to do with D1/D2/Phobos/Tango and not just really poor unvetted
tutorials. It
 would really be helpful if those providing references, code snippets,
tutorials, etc
 clearly identify the context (i.e D1/D2/Phobos/Tango). I just think it would
help
 accelerate the spread and acceptance of this language if more of the code
worked as listed.
<snip> Even the particular version of (DM)D in which it has been tested, given how much the language has been changing. There have been language-level changes to D2 very recently, and bug 1824 is one of probably many that still need to be dealt with before it can stabilise. Stewart.
Apr 18 2012