www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DMD 2.006 release

reply Walter Bright <newshound1 digitalmars.com> writes:
Strings are now invariant. More library overhauls, new library modules. 
These changes exacerbated problems with const/volatile, so next up is 
overhauling that.

http://www.digitalmars.com/d/changelog.html
http://ftp.digitalmars.com/dmd.2.006.zip
Oct 16 2007
next sibling parent reply Witold Baryluk <baryluk smp.if.uj.edu.pl> writes:
Dnia Tue, 16 Oct 2007 10:03:26 -0700
Walter Bright <newshound1 digitalmars.com> napisa=B3/a:

 Strings are now invariant. More library overhauls, new library
 modules. These changes exacerbated problems with const/volatile, so
 next up is overhauling that.
=20
 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
Greate release! (And three previous also :D) But what is rational reason for this? "Breaking change: std.stdio.writef can now only accept a format as its first argument." const/invariant problems, performance? Or it was too complicated? I thing that=20 writefln("a=3D%d", a, "b=3D%.3f", b); is more readble than writefln("a=3D%d b=3D%d", a, b); (in some sense) PS. std.* links in changelog are not working. --=20 Witold Baryluk, aleph0
Oct 16 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Witold Baryluk wrote:
 Dnia Tue, 16 Oct 2007 10:03:26 -0700
 Walter Bright <newshound1 digitalmars.com> napisa³/a:
 
 Strings are now invariant. More library overhauls, new library
 modules. These changes exacerbated problems with const/volatile, so
 next up is overhauling that.

 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
Greate release! (And three previous also :D) But what is rational reason for this? "Breaking change: std.stdio.writef can now only accept a format as its first argument." const/invariant problems, performance? Or it was too complicated? I thing that writefln("a=%d", a, "b=%.3f", b); is more readble than writefln("a=%d b=%d", a, b); (in some sense)
I think that's ok still. It says the *first* argument only. The first argument is a format string in both of your examples. What you can't do is: writefln(a, " is the value of a"); I think the problem is that the implementation of writef et al can't tell if you're passing it a literal string format or a variable that happens to be a string as the first argument. This doesn't really seem to fix the ambiguity of passing in a string as the first argument, but maybe the idea is to get people out of the habit of passing a variable as the first arg in general? Just a guess though. --bb
Oct 16 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Bill Baxter wrote:
 Witold Baryluk wrote:
 Dnia Tue, 16 Oct 2007 10:03:26 -0700
 Walter Bright <newshound1 digitalmars.com> napisa³/a:

 Strings are now invariant. More library overhauls, new library
 modules. These changes exacerbated problems with const/volatile, so
 next up is overhauling that.

 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
Greate release! (And three previous also :D) But what is rational reason for this? "Breaking change: std.stdio.writef can now only accept a format as its first argument." const/invariant problems, performance? Or it was too complicated? I thing that writefln("a=%d", a, "b=%.3f", b); is more readble than writefln("a=%d b=%d", a, b); (in some sense)
Nevermind, you're right. The changelog summary is worded poorly. Looking at std.stdio the actual situation is: "writef (and also writefln) only scans its first string argument for format specifiers, but not subsequent string arguments." That is too bad. I always thought the interspersed formats thing was a cool feature of writef/writefln. --bb
Oct 16 2007
parent renoX <renosky free.fr> writes:
Bill Baxter a écrit :
 Bill Baxter wrote:
 Witold Baryluk wrote:
 Dnia Tue, 16 Oct 2007 10:03:26 -0700
 Walter Bright <newshound1 digitalmars.com> napisa³/a:

 Strings are now invariant. More library overhauls, new library
 modules. These changes exacerbated problems with const/volatile, so
 next up is overhauling that.

 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
Greate release! (And three previous also :D) But what is rational reason for this? "Breaking change: std.stdio.writef can now only accept a format as its first argument." const/invariant problems, performance? Or it was too complicated? I thing that writefln("a=%d", a, "b=%.3f", b); is more readble than writefln("a=%d b=%d", a, b); (in some sense)
Nevermind, you're right. The changelog summary is worded poorly. Looking at std.stdio the actual situation is: "writef (and also writefln) only scans its first string argument for format specifiers, but not subsequent string arguments." That is too bad. I always thought the interspersed formats thing was a cool feature of writef/writefln.
Agreed, this is a big regression, I hope that it'll be fixed. renoX
 
 --bb
Oct 21 2007
prev sibling next sibling parent "dominik" <aha aha.com> writes:
great release! munch and getopt :) 
Oct 16 2007
prev sibling next sibling parent Dejan Lekic <dejan.lekic gmail.com> writes:
This release is proof that Phobos is not dead. :) Great work all of You guys,
and thank You for these wonderfull changes! \o/

Kind regards
Oct 16 2007
prev sibling next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Walter Bright wrote:
 Strings are now invariant. More library overhauls, new library modules. 
 These changes exacerbated problems with const/volatile, so next up is 
 overhauling that.
 
 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
Wow. Phobos 2.x is really on the move! Any chance we could get a std.string.startsWith and std.string.endsWith? They are simple one-liners, but often useful. Here's my D1.x implementation: bool startsWith(string s, string sub) { return (s.length>=sub.length && s[0..sub.length]==sub); } bool endsWith(string s, string sub) { return (s.length>=sub.length && s[$-sub.length..$]==sub); } If there's some subtle bug in the above (zero length strings?), my apologies -- but that's all the more reason they should be in the library! --bb
Oct 16 2007
parent Lionello Lunesu <lio lunesu.remove.com> writes:
Bill Baxter wrote:
     bool startsWith(string s, string sub) {
         return (s.length>=sub.length && s[0..sub.length]==sub);
     }
     bool endsWith(string s, string sub) {
         return (s.length>=sub.length && s[$-sub.length..$]==sub);
     }
I think those would be useful for any type T. Array properties? L.
Oct 17 2007
prev sibling next sibling parent reply Carlos Santander <csantander619 gmail.com> writes:
Walter Bright escribió:
 Strings are now invariant. More library overhauls, new library modules. 
 These changes exacerbated problems with const/volatile, so next up is 
 overhauling that.
 
 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
Maybe I missed something, but does the inclusion of std.variant mean that std.boxer will be deprecated or removed at some point? -- Carlos Santander Bernal
Oct 16 2007
next sibling parent Marcin Kuszczak <aarti_nospam please_interia.pl> writes:
Carlos Santander wrote:

 Walter Bright escribi=C3=B3:
 Strings are now invariant. More library overhauls, new library modul=
es.
 These changes exacerbated problems with const/volatile, so next up i=
s
 overhauling that.
=20
 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
=20 Maybe I missed something, but does the inclusion of std.variant mean =
that
 std.boxer will be deprecated or removed at some point?
=20
It seems so... I found following in std.boxer: WARNING: This module is being phased out. You may want to use std.variant for n= ew code. --=20 Regards Marcin Kuszczak (Aarti_pl) ------------------------------------- Ask me why... I believe in Jesus - http://www.zapytajmnie.com (en/pl) Doost (port of few Boost libraries) - http://www.dsource.org/projects/d= oost/ -------------------------------------
Oct 16 2007
prev sibling parent reply Walter Bright <newshound1 digitalmars.com> writes:
Carlos Santander wrote:
 Maybe I missed something, but does the inclusion of std.variant mean 
 that std.boxer will be deprecated or removed at some point?
Yes. If you're using boxer, take a serious look at variant, and see if that works for you.
Oct 16 2007
next sibling parent reply 0ffh <spam frankhirsch.net> writes:
Walter Bright wrote:
 Yes. If you're using boxer, take a serious look at variant, and see if 
 that works for you.
It's as good as incorporated in Drat! already... =) BTW news://news.digitalmars.com:119/ff393g$2mqk$1 digitalmars.com ? Regards, Frank
Oct 16 2007
parent Walter Bright <newshound1 digitalmars.com> writes:
0ffh wrote:
 Walter Bright wrote:
 Yes. If you're using boxer, take a serious look at variant, and see if 
 that works for you.
It's as good as incorporated in Drat! already... =) BTW news://news.digitalmars.com:119/ff393g$2mqk$1 digitalmars.com ?
Well, std.boxer isn't going to be deleted. It may get moved to etc.boxer.
Oct 16 2007
prev sibling parent Marcin Kuszczak <aarti_nospam please_interia.pl> writes:
Walter Bright wrote:

 Carlos Santander wrote:
 Maybe I missed something, but does the inclusion of std.variant mean
 that std.boxer will be deprecated or removed at some point?
Yes. If you're using boxer, take a serious look at variant, and see if that works for you.
There is missing functionality in variant though. I mean converting variadic function parameters into array of Boxes. It's nice, so it should be retained IMHO. Or do you want to change variadic parameters to functions to something better, so it would not be so usefull? ----- I am also not sure if "variant inside variant" will work with opAssign. I mean situation: Variant a; a =5; Variant b; b=a; What is type of b? Variant or int? I don't see any other chance to make it Variant, than using b.opAssign(a); what is quite ugly, and what worse needs from developer previous decision which types will he store in Variant - if he won't use "Variant inside Variant", so he can use normal assignments; in other case he must consequently use b.opAssign(a) everywhere. It seems that in this case Box was also better, than current implementation. -- Regards Marcin Kuszczak (Aarti_pl) ------------------------------------- Ask me why... I believe in Jesus - http://www.zapytajmnie.com (en/pl) Doost (port of few Boost libraries) - http://www.dsource.org/projects/doost/ -------------------------------------
Oct 16 2007
prev sibling next sibling parent 0ffh <spam frankhirsch.net> writes:
Wow! Something for Phobos users (like myself), and for those
who look forward to more interoperability between Phobos and
Tango. At least that's how I interpret "Incorporated many of
the Tango GC structural differences".

D keeps on rollin' ... thanks! =)

regards, Frank
Oct 16 2007
prev sibling next sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Walter Bright Wrote:

 Implemented Overload Sets for functions and templates.
Awesome! One of my most-=anticipated features discussed at the conference! Not a huge change, but that extra icing on the cake that makes D such a pleasure to use. Thanks for the wonderful release!
Oct 16 2007
parent Walter Bright <newshound1 digitalmars.com> writes:
Robert Fraser wrote:
 Walter Bright Wrote:
 
 Implemented Overload Sets for functions and templates.
Awesome! One of my most-=anticipated features discussed at the conference! Not a huge change, but that extra icing on the cake that makes D such a pleasure to use.
Turned out to be easier to implement than I'd thought.
 Thanks for the wonderful release!
You're welcome!
Oct 16 2007
prev sibling next sibling parent reply "Stewart Gordon" <smjg_1998 yahoo.com> writes:
"Walter Bright" <newshound1 digitalmars.com> wrote in message 
news:ff2qro$1un3$1 digitalmars.com...
 Strings are now invariant. More library overhauls, new library modules. 
 These changes exacerbated problems with const/volatile, so next up is 
 overhauling that.
Like cleaning up parameter types in std.string and the like. I've noticed that there's a lot of deprecated Phobos stuff even in the 2.x edition, some of it even deprecated before 1.x. This ought to be cleaned out soon.... Stewart. -- My e-mail address is valid but not my primary mailbox. Please keep replies on the 'group where everybody may benefit.
Oct 17 2007
parent reply Regan Heath <regan netmail.co.nz> writes:
Stewart Gordon wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message 
 news:ff2qro$1un3$1 digitalmars.com...
 Strings are now invariant. More library overhauls, new library 
 modules. These changes exacerbated problems with const/volatile, so 
 next up is overhauling that.
Like cleaning up parameter types in std.string and the like. I've noticed that there's a lot of deprecated Phobos stuff even in the 2.x edition, some of it even deprecated before 1.x. This ought to be cleaned out soon....
By moving it from "std." to "etc." so people can still use it if they really really need to, right? Regan
Oct 17 2007
parent "Stewart Gordon" <smjg_1998 yahoo.com> writes:
"Regan Heath" <regan netmail.co.nz> wrote in message 
news:ff5fis$29ek$1 digitalmars.com...
 Stewart Gordon wrote:
<snip>
 I've noticed that there's a lot of deprecated Phobos stuff even in the 
 2.x edition, some of it even deprecated before 1.x.  This ought to be 
 cleaned out soon....
By moving it from "std." to "etc." so people can still use it if they really really need to, right?
Most D 0.x code wouldn't compile without changes under D 2.x. So any project that's worth updating to D 2.x is surely worth updating to Phobos 2.x while at it? Stewart. -- My e-mail address is valid but not my primary mailbox. Please keep replies on the 'group where everybody may benefit.
Oct 17 2007
prev sibling parent charles <charlie d.com> writes:
Instead of const and friends, why not make user definable constraints ( 
const could be one of them - for people other than me ), as detailed in 
scott meyers presentation 
http://video.google.com/videoplay?docid=-4728145737208991310&q=red+code+green+code&total=173&start=0&num=10&so=0&ty
e=search&plindex=0. 
?



Walter Bright wrote:
 Strings are now invariant. More library overhauls, new library modules. 
 These changes exacerbated problems with const/volatile, so next up is 
 overhauling that.
 
 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.006.zip
Oct 17 2007