Re: Back from the dead - How is D going?

2009-11-13 Thread Don
Bruno Medeiros wrote: Hi everyone! After a long hiatus I think I'm now able to come back to the D community and be participating with it again. As a result I have more than 16000 unread posts in digitalmars.D alone and I'm still wondering whether I should try to check all those threads or no

Re: How about Go's... error on unused imports?

2009-11-13 Thread Walter Bright
Leandro Lucarella wrote: Walter Bright, el 13 de noviembre a las 18:17 me escribiste: bearophile wrote: Clay Smith: I would like my all.d files to not give errors :o< "all.d" files are a hack used to patch one of the minor holes of the current D module system. The right way to do that is wit

Re: How about Go's... error on unused imports?

2009-11-13 Thread Leandro Lucarella
Walter Bright, el 13 de noviembre a las 18:17 me escribiste: > bearophile wrote: > >Clay Smith: > > > >>I would like my all.d files to not give errors :o< > > > >"all.d" files are a hack used to patch one of the minor holes of the > >current D module system. The right way to do that is with a synta

Re: Back from the dead - How is D going?

2009-11-13 Thread Nick B
Bruno Medeiros wrote: Hi everyone! After a long hiatus I think I'm now able to come back to the D community and be participating with it again. As a result I have more than 16000 unread posts in digitalmars.D alone and I'm still wondering whether I should try to check all those threads or no

Re: How about Go's... error on unused imports?

2009-11-13 Thread Walter Bright
bearophile wrote: Clay Smith: I would like my all.d files to not give errors :o< "all.d" files are a hack used to patch one of the minor holes of the current D module system. The right way to do that is with a syntax like (that must not import the 'foo' name too in the current namespace, only

Re: How about Go's... error on unused imports?

2009-11-13 Thread Leandro Lucarella
Andrei Alexandrescu, el 13 de noviembre a las 14:31 me escribiste: > bearophile wrote: > >Nick Sabalausky: > >>I used to think so, but I'm not so sure anymore. > > > >It's the same for me. I can live without the *, as I can live without D > >typedef. > >There are other changes/fixed that I want fo

Re: std.metastrings

2009-11-13 Thread Brad Roberts
On Fri, 13 Nov 2009, Bill Baxter wrote: > Std.metastrings could use some work. > > So I'm thinking to take it upon myself to make it more useful. > > After asking some questions here about it previously, I got a bunch of > comments like "oh yeh I have that in my CoolTools.ctfe module". Well, >

Re: How about Go's... error on unused imports?

2009-11-13 Thread Lutger
Bill Baxter wrote: > On Fri, Nov 13, 2009 at 4:29 PM, Lutger > wrote: >> Bill Baxter wrote: >> >>> On Fri, Nov 13, 2009 at 10:28 AM, Lutger >>> wrote: Justin Johansson wrote: > No, sorry I am not informed on D's policy about warnings Exactly. Ever wondered why that is? >>

Re: Back from the dead - How is D going?

2009-11-13 Thread Lutger
Bruno Medeiros wrote: > Hi everyone! > > After a long hiatus I think I'm now able to come back to the D community > and be participating with it again. As a result I have more than 16000 > unread posts in digitalmars.D alone and I'm still wondering whether I > should try to check all those threa

Re: Back from the dead - How is D going?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 4:35 PM, Bruno Medeiros wrote: > Hi everyone! > > After a long hiatus I think I'm now able to come back to the D community and >  be participating with it again. As a result I have more than 16000 unread > posts in digitalmars.D alone and I'm still wondering whether I shoul

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 4:29 PM, Lutger wrote: > Bill Baxter wrote: > >> On Fri, Nov 13, 2009 at 10:28 AM, Lutger >> wrote: >>> Justin Johansson wrote: >>> No, sorry I am not informed on D's policy about warnings >>> >>> Exactly. Ever wondered why that is? >>> >>> The policy is: there are no

Back from the dead - How is D going?

2009-11-13 Thread Bruno Medeiros
Hi everyone! After a long hiatus I think I'm now able to come back to the D community and be participating with it again. As a result I have more than 16000 unread posts in digitalmars.D alone and I'm still wondering whether I should try to check all those threads or not... (I will read up on

Re: How about Go's... error on unused imports?

2009-11-13 Thread Lutger
Bill Baxter wrote: > On Fri, Nov 13, 2009 at 10:28 AM, Lutger > wrote: >> Justin Johansson wrote: >> >>> No, sorry I am not informed on D's policy about warnings >> >> Exactly. Ever wondered why that is? >> >> The policy is: there are no warnings. > > Probably more clear to say "all warnings are

Re: How about Go's... error on unused imports? (aside)

2009-11-13 Thread Justin Johansson
> Leandro Lucarella (AKA luca) http://llucax.com.ar/ > -- > GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) > -- > Long

Re: How about Go's... error on unused imports?

2009-11-13 Thread Leandro Lucarella
Nick Sabalausky, el 13 de noviembre a las 17:06 me escribiste: > "bearophile" wrote in message > news:hdkavm$1b0...@digitalmars.com... > > Clay Smith: > > > >>I would like my all.d files to not give errors :o< > > > > "all.d" files are a hack used to patch one of the minor holes of the > > curre

Re: How about Go's... error on unused imports?

2009-11-13 Thread Leandro Lucarella
bearophile, el 13 de noviembre a las 14:10 me escribiste: > Clay Smith: > > >I would like my all.d files to not give errors :o< > > "all.d" files are a hack used to patch one of the minor holes of the > current D module system. That's true, I like the Google's Go aproach: no modules, just packag

Re: How about Go's... error on unused imports?

2009-11-13 Thread Leandro Lucarella
Clay Smith, el 13 de noviembre a las 13:20 me escribiste: > >How about that one from Go? Including all deps in an obj. Could D > >use the same trick to speed up compilation further? > > I'm not really understanding what you are saying, but I see no need > for the compiler to error on unused impo

Re: Windows Installer Completely Whacks the PATH

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 2:06 PM, bearophile wrote: > Ary Borenszweig: >> but there isn't a solution there. If someone finds a solution the >> installer should be changed to that. > > If that's a real bug, then the installer on the site has to be removed until > a solution is found. Because such b

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 2:31 PM, Andrei Alexandrescu wrote: > bearophile wrote: >> >> Nick Sabalausky: >>> >>> I used to think so, but I'm not so sure anymore. >> >> It's the same for me. I can live without the *, as I can live without D >> typedef. >> There are other changes/fixed that I want for

Re: How about Go's... error on unused imports?

2009-11-13 Thread Andrei Alexandrescu
bearophile wrote: Nick Sabalausky: I used to think so, but I'm not so sure anymore. It's the same for me. I can live without the *, as I can live without D typedef. There are other changes/fixed that I want for the module system still. Are they in bugzilla? bugzilla: That stone will be even

Re: How about Go's... error on unused imports?

2009-11-13 Thread bearophile
Nick Sabalausky: > I used to think so, but I'm not so sure anymore. It's the same for me. I can live without the *, as I can live without D typedef. There are other changes/fixed that I want for the module system still. Bye, bearophile

Re: How about Go's... error on unused imports?

2009-11-13 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:hdklbg$2p2...@digitalmars.com... > "bearophile" wrote in message > news:hdkavm$1b0...@digitalmars.com... >> Clay Smith: >> >>>I would like my all.d files to not give errors :o< >> >> "all.d" files are a hack used to patch one of the minor holes of the >>

Re: typedef redux

2009-11-13 Thread Moritz Warning
On Thu, 12 Nov 2009 13:07:24 -0800, Walter Bright wrote: > Justin Johansson wrote: >> I remember the discussion ... and if two intelligent folks in language >> design can't agree on "inheritance direction" ... and given the paucity >> of benefits ... there is only one reasonable promise to fulfill

Re: Windows Installer Completely Whacks the PATH

2009-11-13 Thread bearophile
Ary Borenszweig: > but there isn't a solution there. If someone finds a solution the > installer should be changed to that. If that's a real bug, then the installer on the site has to be removed until a solution is found. Because such bug is not ethic and it's an awful anti-advertising. Bye, b

Re: How about Go's... error on unused imports?

2009-11-13 Thread Nick Sabalausky
"bearophile" wrote in message news:hdkavm$1b0...@digitalmars.com... > Clay Smith: > >>I would like my all.d files to not give errors :o< > > "all.d" files are a hack used to patch one of the minor holes of the > current D module system. The right way to do that is with a syntax like > (that mus

Re: How about Go's... error on unused imports?

2009-11-13 Thread Nick Sabalausky
"bearophile" wrote in message news:hdjhuu$10f...@digitalmars.com... > Leandro Lucarella: > >> I'm sorry to bring up another "How about Go's ..." topic, but I think >> this >> feature is very in sync with D and it should be really easy to implement. >> >> Go issues an error if you have an import

Re: Windows Installer Completely Whacks the PATH

2009-11-13 Thread Ary Borenszweig
news.digitalmars.com wrote: Not a big complaint, since I'm loving D for all the right reasons, but the one-click Windows installer replaces the PATH with one including only the location of DMD and DMC. Which hosed a lot of applications on my system till I thought to look there for the problem.

Re: std.metastrings

2009-11-13 Thread Andrei Alexandrescu
Bill Baxter wrote: Std.metastrings could use some work. So I'm thinking to take it upon myself to make it more useful. After asking some questions here about it previously, I got a bunch of comments like "oh yeh I have that in my CoolTools.ctfe module". Well, that's kinda silly that everyone i

Re: How about Go's... error on unused imports?

2009-11-13 Thread Andrei Alexandrescu
Bill Baxter wrote: On Fri, Nov 13, 2009 at 11:15 AM, Clay Smith wrote: bearophile wrote: Clay Smith: I would like my all.d files to not give errors :o< "all.d" files are a hack used to patch one of the minor holes of the current D module system. The right way to do that is with a syntax lik

Windows Installer Completely Whacks the PATH

2009-11-13 Thread news.digitalmars.com
Not a big complaint, since I'm loving D for all the right reasons, but the one-click Windows installer replaces the PATH with one including only the location of DMD and DMC. Which hosed a lot of applications on my system till I thought to look there for the problem. A once rather long PATH valu

Re: How about Go's... error on unused imports?

2009-11-13 Thread bearophile
Bill Baxter: >but in both Java and Python where they have this feature, its use is frowned >upon.< You are right, we can live without this small anti-feature. But I want so see some of the holes of the D module system fixed. Bye, bearophile

Re: std.metastrings

2009-11-13 Thread bearophile
Bill Baxter: > I'm just mentioning this here in case someone wants to stop me, or > offer their versions of CoolTools.ctfe, or argue that it should be > std.ctfe rather than std.metastrings, or whatever. I suggest you to ask to downs too, he has done lot of such things. Using a cleaned up part

Re: How about Go's... error on unused imports?

2009-11-13 Thread bearophile
Bill Baxter: > It would be a convenient feature, but in both Java and Python where > they have this feature, its use is frowned upon. I agree, but: - It may be handy in small script-like programs. - It has the advantage of removing the need of the "all.d" modules that are hackish. - Once you use

Re: Std. Lib and Binary Attribution

2009-11-13 Thread Robert Jacques
On Fri, 13 Nov 2009 15:13:38 -0500, Adam D. Ruppe wrote: On Fri, Nov 13, 2009 at 02:54:53PM -0500, Robert Jacques wrote: The problem is that if std.extra gets statically linked in (i.e. in the normal manner), then you'd have to include the license, even if you don't use the library. If

std.metastrings

2009-11-13 Thread Bill Baxter
Std.metastrings could use some work. So I'm thinking to take it upon myself to make it more useful. After asking some questions here about it previously, I got a bunch of comments like "oh yeh I have that in my CoolTools.ctfe module". Well, that's kinda silly that everyone is re-inventing such t

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 11:50 AM, Yigal Chripun wrote: > On 13/11/2009 19:30, Bill Baxter wrote: >> >> On Fri, Nov 13, 2009 at 8:40 AM, bearophile >> wrote: >>> >>> Bill Baxter: 2) how to get and report errors related to failure to compile some code. (this one I hadn't thought of ba

Re: Std. Lib and Binary Attribution

2009-11-13 Thread Adam D. Ruppe
On Fri, Nov 13, 2009 at 02:54:53PM -0500, Robert Jacques wrote: > The problem is that if std.extra gets statically linked in (i.e. in the > normal manner), then you'd have to include the license, even if you don't > use the library. If it isn't referenced though, shouldn't the linker strip it

Re: Std. Lib and Binary Attribution

2009-11-13 Thread Robert Jacques
On Fri, 13 Nov 2009 14:11:44 -0500, dsimcha wrote: One possible way to mitigate licensing issues for the std. lib would be to have std.* be exclusively Boost licensed, but allow code with slightly less permissive licenses (BSD, etc.) under std.extra.*. This would allow people to know tha

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 11:36 AM, Clay Smith wrote: > Bill Baxter wrote: >> >> On Fri, Nov 13, 2009 at 11:15 AM, Clay Smith >> wrote: >>> >>> bearophile wrote: Clay Smith: > I would like my all.d files to not give errors :o< "all.d" files are a hack used to patch one

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread Yigal Chripun
On 13/11/2009 19:30, Bill Baxter wrote: On Fri, Nov 13, 2009 at 8:40 AM, bearophile wrote: Bill Baxter: 2) how to get and report errors related to failure to compile some code. (this one I hadn't thought of back then) I'd like a "static foreach" too. Eventually most statements will have a sta

Re: How about Go's... error on unused imports?

2009-11-13 Thread Clay Smith
Bill Baxter wrote: On Fri, Nov 13, 2009 at 11:15 AM, Clay Smith wrote: bearophile wrote: Clay Smith: I would like my all.d files to not give errors :o< "all.d" files are a hack used to patch one of the minor holes of the current D module system. The right way to do that is with a syntax lik

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 11:12 AM, Clay Smith wrote: > Bill Baxter wrote: >> >> On Fri, Nov 13, 2009 at 10:23 AM, Clay Smith >> wrote: >>> >>> Clay Smith wrote: Bill Baxter wrote: > > On Fri, Nov 13, 2009 at 9:51 AM, Clay Smith > wrote: >> >> Leandro Lucarella wrote:

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 11:15 AM, Clay Smith wrote: > bearophile wrote: >> >> Clay Smith: >> >>> I would like my all.d files to not give errors :o< >> >> "all.d" files are a hack used to patch one of the minor holes of the >> current D module system. The right way to do that is with a syntax like

Re: How about Go's... error on unused imports?

2009-11-13 Thread Clay Smith
bearophile wrote: Clay Smith: I would like my all.d files to not give errors :o< "all.d" files are a hack used to patch one of the minor holes of the current D module system. The right way to do that is with a syntax like (that must not import the 'foo' name too in the current namespace, on

Re: How about Go's... error on unused imports?

2009-11-13 Thread Clay Smith
Bill Baxter wrote: On Fri, Nov 13, 2009 at 10:23 AM, Clay Smith wrote: Clay Smith wrote: Bill Baxter wrote: On Fri, Nov 13, 2009 at 9:51 AM, Clay Smith wrote: Leandro Lucarella wrote: I'm sorry to bring up another "How about Go's ..." topic, but I think this feature is very in sync with D

Re: How about Go's... error on unused imports?

2009-11-13 Thread bearophile
Clay Smith: >I would like my all.d files to not give errors :o< "all.d" files are a hack used to patch one of the minor holes of the current D module system. The right way to do that is with a syntax like (that must not import the 'foo' name too in the current namespace, only the names inside

Std. Lib and Binary Attribution

2009-11-13 Thread dsimcha
One possible way to mitigate licensing issues for the std. lib would be to have std.* be exclusively Boost licensed, but allow code with slightly less permissive licenses (BSD, etc.) under std.extra.*. This would allow people to know that they don't have to worry about licensing at all as long as

Re: D library projects : adopting Boost license

2009-11-13 Thread Walter Bright
Yigal Chripun wrote: [...] On dsource you wrote: "The current situation requires to get an explicit permission to change the license from each contributor for his code and if someone cannot be contacted for any reason, his contribution cannot be re-licensed." That's a big problem. The only

Re: D library projects : adopting Boost license

2009-11-13 Thread Walter Bright
Yigal Chripun wrote: You're saying that if I write code using Tango, I can license *my* code with whatever I want. My source will require a tango dll to work and *that* dll must come with its apache 2.0 license file. That sounds completely reasonable to me. I don't get what the problem with t

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 10:28 AM, Lutger wrote: > Justin Johansson wrote: > >> No, sorry I am not informed on D's policy about warnings > > Exactly. Ever wondered why that is? > > The policy is: there are no warnings. Probably more clear to say "all warnings are treated as errors." --bb

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 10:23 AM, Clay Smith wrote: > Clay Smith wrote: >> >> Bill Baxter wrote: >>> >>> On Fri, Nov 13, 2009 at 9:51 AM, Clay Smith >>> wrote: Leandro Lucarella wrote: > > I'm sorry to bring up another "How about Go's ..." topic, but I think > this > fea

Re: How about Go's... error on unused imports?

2009-11-13 Thread Lutger
Justin Johansson wrote: > No, sorry I am not informed on D's policy about warnings Exactly. Ever wondered why that is? The policy is: there are no warnings.

Re: How about Go's... error on unused imports?

2009-11-13 Thread Clay Smith
Bill Baxter wrote: On Fri, Nov 13, 2009 at 9:51 AM, Clay Smith wrote: Leandro Lucarella wrote: I'm sorry to bring up another "How about Go's ..." topic, but I think this feature is very in sync with D and it should be really easy to implement. Go issues an error if you have an import that's n

Re: How about Go's... error on unused imports?

2009-11-13 Thread Clay Smith
Clay Smith wrote: Bill Baxter wrote: On Fri, Nov 13, 2009 at 9:51 AM, Clay Smith wrote: Leandro Lucarella wrote: I'm sorry to bring up another "How about Go's ..." topic, but I think this feature is very in sync with D and it should be really easy to implement. Go issues an error if you ha

Re: How about Go's... error on unused imports?

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 9:51 AM, Clay Smith wrote: > Leandro Lucarella wrote: >> >> I'm sorry to bring up another "How about Go's ..." topic, but I think this >> feature is very in sync with D and it should be really easy to implement. >> >> Go issues an error if you have an import that's never us

Re: How about Go's... error on unused imports?

2009-11-13 Thread Clay Smith
Leandro Lucarella wrote: I'm sorry to bring up another "How about Go's ..." topic, but I think this feature is very in sync with D and it should be really easy to implement. Go issues an error if you have an import that's never used, to avoid unnecessary dependencies. Do you see any reasons not

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 9:38 AM, Andrei Alexandrescu wrote: > Bill Baxter wrote: >> >> On Fri, Nov 13, 2009 at 8:40 AM, bearophile >> wrote: >>> >>> Bill Baxter: 2) how to get and report errors related to failure to compile some code. (this one I hadn't thought of back then) >>> >>

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread Andrei Alexandrescu
Bill Baxter wrote: On Fri, Nov 13, 2009 at 8:40 AM, bearophile wrote: Bill Baxter: 2) how to get and report errors related to failure to compile some code. (this one I hadn't thought of back then) I'd like a "static foreach" too. Eventually most statements will have a static version. At that

Re: typedef redux

2009-11-13 Thread Andrei Alexandrescu
Moritz Warning wrote: On Thu, 12 Nov 2009 09:37:07 -0600, Andrei Alexandrescu wrote: My perception following the discussion around typedef is that we should eliminate it. What we offer is "alias", which is a generalization of C's "typedef", and the change of name is justified by the fact that "

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 8:40 AM, bearophile wrote: > Bill Baxter: >> 2) how to get and report errors related to failure to compile some >> code. (this one I hadn't thought of back then) > > I'd like a "static foreach" too. Eventually most statements will have a > static version. At that point peo

Re: How about Go's... error on unused imports? -> marking unused imports

2009-11-13 Thread Leandro Lucarella
Ellery Newcomer, el 13 de noviembre a las 08:36 me escribiste: > >> Secondly, what if I version out some code, wouldn't want to version the > >> import too. > > > > Why? > > > > Given the way DMD currently works, such a feature could only say this > import is unused in this version configuration

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread bearophile
Bill Baxter: > 2) how to get and report errors related to failure to compile some > code. (this one I hadn't thought of back then) I'd like a "static foreach" too. Eventually most statements will have a static version. At that point people will start seeing this little duplication in the languag

Re: Serialization + semantics of toString

2009-11-13 Thread aarti_pl
Jacob Carlborg pisze: On 11/13/09 16:03, aarti_pl wrote: Jacob Carlborg Wrote: On 11/13/09 00:13, aarti_pl wrote: Andrei Alexandrescu pisze: > But that being said, I'd so much want to start thinking of an actual > text serialization infrastructure. Why develop one later with the >

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 12:09 AM, Don wrote: > Bill Baxter wrote: >> >> We can pretty much already use __traits(compiles,{...}) to implement >> static interface checking. >> >> template checkInterface(T) { >>    enum bool checkInterface = >>    __traits(compiles, >>    { >>       T x; >>       //

Re: @safe leak fix?

2009-11-13 Thread Robert Jacques
On Fri, 13 Nov 2009 06:42:24 -0500, Steven Schveighoffer wrote: On Thu, 12 Nov 2009 19:29:28 -0500, Robert Jacques wrote: On Thu, 12 Nov 2009 08:56:25 -0500, Steven Schveighoffer wrote: On Thu, 12 Nov 2009 08:45:36 -0500, Jason House wrote: Walter Bright Wrote: Jason House wr

Re: Serialization + semantics of toString

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 7:14 AM, aarti_pl wrote: > Bill Baxter Wrote: > >> On Fri, Nov 13, 2009 at 12:13 AM, aarti_pl wrote: >> > Andrei Alexandrescu Wrote: >> > >> > Additionally I would like to mention that there is also great >> > BinaryArchive from Bill Baxter, which I didn't mention in my f

Re: D library projects : adopting Boost license

2009-11-13 Thread dsimcha
== Quote from Yigal Chripun (yigal...@gmail.com)'s article > Generally speaking, is static linking of the stdlib the right thing? > I realize that's the only working option now, but when this is fixed > (and it really should be fixed) would that still be the correct choice > for the stdlib? Yes, i

Re: Named return type > Out parameters

2009-11-13 Thread Robert Jacques
On Fri, 13 Nov 2009 07:30:55 -0500, grauzone wrote: のしいか (noshiika) wrote: Bill Baxter さんは書きました: Did go do away with the comma sequencing operator? I can't find it. That's the first thing D needs to do. Otherwise a,b = function() is difficult to make work. How about redefining the comm

Re: Fixed-size arrays and 'null'

2009-11-13 Thread Max Samukha
On Thu, 12 Nov 2009 12:18:26 +0200, Max Samukha wrote: >Please consider the following: > >import std.stdio; > >void foo(int[3] a) {} > >void main() >{ >int[3] a = null; // 1 >a = null; // 2 >foo(null); // 3 >if (a is null){} // 4 >if (a == null){} // 5 >} > >1 - 2. These comp

Re: Serialization + semantics of toString

2009-11-13 Thread aarti_pl
Bill Baxter Wrote: > On Fri, Nov 13, 2009 at 12:13 AM, aarti_pl wrote: > > Andrei Alexandrescu Wrote: > > > > Additionally I would like to mention that there is also great BinaryArchive > > from Bill Baxter, which I didn't mention in my first post. > > There is? Completely forgot about that. >

Re: Serialization + semantics of toString

2009-11-13 Thread Jacob Carlborg
On 11/13/09 16:03, aarti_pl wrote: Jacob Carlborg Wrote: On 11/13/09 00:13, aarti_pl wrote: Andrei Alexandrescu pisze: > But that being said, I'd so much want to start thinking of an actual > text serialization infrastructure. Why develop one later with the > mention "well use that st

Re: Serialization + semantics of toString

2009-11-13 Thread aarti_pl
Jacob Carlborg Wrote: > On 11/13/09 00:13, aarti_pl wrote: > > Andrei Alexandrescu pisze: > > > But that being said, I'd so much want to start thinking of an actual > > > text serialization infrastructure. Why develop one later with the > > > mention "well use that stuff for debugging only, thi

Re: Serialization + semantics of toString

2009-11-13 Thread Jacob Carlborg
On 11/13/09 15:17, Denis Koroskin wrote: On Fri, 13 Nov 2009 17:11:54 +0300, Jacob Carlborg wrote: On 11/13/09 00:13, aarti_pl wrote: Andrei Alexandrescu pisze: > But that being said, I'd so much want to start thinking of an actual > text serialization infrastructure. Why develop one later wi

Re: How about Go's... error on unused imports?

2009-11-13 Thread Ellery Newcomer
Leandro Lucarella wrote: > Walter Bright, el 12 de noviembre a las 19:35 me escribiste: >> Andrei Alexandrescu wrote: >>> I think this is an environment issue. I like Eclipse's approach. >>> Java unnecessary imports are underlined with a wavy red line. >> I agree. I would find it very annoying to h

Re: Serialization + semantics of toString

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 12:13 AM, aarti_pl wrote: > Andrei Alexandrescu Wrote: > > Additionally I would like to mention that there is also great BinaryArchive > from Bill Baxter, which I didn't mention in my first post. There is? Completely forgot about that. If I recall the big wish list item

GDC on Snow Leopard

2009-11-13 Thread Anders F Björklund
Could someone with Mac OS X 10.6 please confirm whether the GDC packages work with gcc-4.0 and the older Xcode ? http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=99966 It's a rather big download (1G) for the Xcode Tools DVD, but it shouldn't conflict with the

Re: @safe leak fix?

2009-11-13 Thread Steven Schveighoffer
On Fri, 13 Nov 2009 08:31:07 -0500, Jason House wrote: Steven Schveighoffer Wrote: So the signature of strstr has to be unmarked (no @safe or @trusted). I disagree. Borrowing the syntax from the return const proposal, let's define strstr as follows: inout(char[]) strstr(inout(char[]) b

Re: Serialization + semantics of toString

2009-11-13 Thread Denis Koroskin
On Fri, 13 Nov 2009 17:11:54 +0300, Jacob Carlborg wrote: On 11/13/09 00:13, aarti_pl wrote: Andrei Alexandrescu pisze: > But that being said, I'd so much want to start thinking of an actual > text serialization infrastructure. Why develop one later with the > mention "well use that stuff f

Re: Serialization + semantics of toString

2009-11-13 Thread Jacob Carlborg
On 11/13/09 00:13, aarti_pl wrote: Andrei Alexandrescu pisze: > But that being said, I'd so much want to start thinking of an actual > text serialization infrastructure. Why develop one later with the > mention "well use that stuff for debugging only, this is the real stuff." > > Andrei You

Re: D library projects : adopting Boost license

2009-11-13 Thread Jacob Carlborg
On 11/13/09 11:11, Yigal Chripun wrote: Don wrote: Yigal Chripun wrote: Robert Jacques wrote: On Fri, 13 Nov 2009 01:08:03 -0500, Yigal Chripun wrote: Robert Jacques wrote: The Apache 2.0 license requires attribution. It's therefore unsuitable for a standard library. From the website FAQ:

Re: @safe leak fix?

2009-11-13 Thread Steven Schveighoffer
On Fri, 13 Nov 2009 08:45:28 -0500, Denis Koroskin <2kor...@gmail.com> wrote: On Fri, 13 Nov 2009 16:16:29 +0300, Steven Schveighoffer wrote: On Fri, 13 Nov 2009 07:46:02 -0500, Denis Koroskin <2kor...@gmail.com> wrote: Sure (with the current compiler): char[] foo() { char buf[10

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread grauzone
Yigal Chripun wrote: grauzone wrote: Yigal Chripun wrote: I really wish this was folded into the language by allowing structs to implement interfaces. interface Range(T) { bool empty(); void popFront(); T front(); } struct MyRange(T) : Range!(T) { ... } // checked by compiler One

Re: @safe leak fix?

2009-11-13 Thread Denis Koroskin
On Fri, 13 Nov 2009 16:16:29 +0300, Steven Schveighoffer wrote: On Fri, 13 Nov 2009 07:46:02 -0500, Denis Koroskin <2kor...@gmail.com> wrote: Sure (with the current compiler): char[] foo() { char buf[100]; // fill buf return strstr(buf, "hi"); // no .dup, buf escapes } No, n

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread Yigal Chripun
grauzone wrote: Yigal Chripun wrote: I really wish this was folded into the language by allowing structs to implement interfaces. interface Range(T) { bool empty(); void popFront(); T front(); } struct MyRange(T) : Range!(T) { ... } // checked by compiler One problem with this was

Re: @safe leak fix?

2009-11-13 Thread Jason House
Steven Schveighoffer Wrote: > On Thu, 12 Nov 2009 18:34:48 -0500, Jason House > wrote: > > > Steven Schveighoffer Wrote: > > > >> On Thu, 12 Nov 2009 08:45:36 -0500, Jason House > >> wrote: > >> > >> > Walter Bright Wrote: > >> > > >> >> Jason House wrote: > >> >> > At a fundamental level, sa

Re: @safe leak fix?

2009-11-13 Thread Steven Schveighoffer
On Fri, 13 Nov 2009 07:46:02 -0500, Denis Koroskin <2kor...@gmail.com> wrote: Sure (with the current compiler): char[] foo() { char buf[100]; // fill buf return strstr(buf, "hi"); // no .dup, buf escapes } No, no, no! It's foo which is unsafe in your example, not strstr! OK, te

Re: How about Go's... error on unused imports?

2009-11-13 Thread Leandro Lucarella
Walter Bright, el 12 de noviembre a las 19:35 me escribiste: > Andrei Alexandrescu wrote: > >I think this is an environment issue. I like Eclipse's approach. > >Java unnecessary imports are underlined with a wavy red line. > > I agree. I would find it very annoying to have to remove unused > impor

Re: @safe leak fix?

2009-11-13 Thread grauzone
Denis Koroskin wrote: I don't like his proposal at all. It introduces one more hidden allocation. Why not just write char[] buf = new char[100]; and disallow taking a slice of static array? (Andrei already hinted this will be disallowed in @safe, if I understood him right). I think that wou

Re: typedef redux

2009-11-13 Thread Moritz Warning
On Thu, 12 Nov 2009 09:37:07 -0600, Andrei Alexandrescu wrote: > My perception following the discussion around typedef is that we should > eliminate it. What we offer is "alias", which is a generalization of C's > "typedef", and the change of name is justified by the fact that "alias" > defines al

Re: @safe leak fix?

2009-11-13 Thread Denis Koroskin
On Fri, 13 Nov 2009 15:29:20 +0300, Steven Schveighoffer wrote: On Fri, 13 Nov 2009 07:01:25 -0500, Denis Koroskin <2kor...@gmail.com> wrote: On Fri, 13 Nov 2009 14:50:58 +0300, Steven Schveighoffer wrote: On Thu, 12 Nov 2009 18:34:48 -0500, Jason House wrote: Steven Schveighoff

Re: array literal element types

2009-11-13 Thread Steven Schveighoffer
On Fri, 13 Nov 2009 07:34:14 -0500, Steven Schveighoffer wrote: On Thu, 12 Nov 2009 20:16:40 -0500, Robert Jacques wrote: On Thu, 12 Nov 2009 16:42:45 -0500, Walter Bright wrote: Currently, the type is determined by the type of the first element and the rest are implicitly cast to

Re: array literal element types

2009-11-13 Thread Simen Kjaeraas
Robert Jacques wrote: On Thu, 12 Nov 2009 16:42:45 -0500, Walter Bright wrote: Currently, the type is determined by the type of the first element and the rest are implicitly cast to it. I propose changing it to being the type produced by applying the ?: logic repeatedly to all the ele

Re: array literal element types

2009-11-13 Thread grauzone
Bill Baxter wrote: On Thu, Nov 12, 2009 at 1:42 PM, Walter Bright wrote: Currently, the type is determined by the type of the first element and the rest are implicitly cast to it. I propose changing it to being the type produced by applying the ?: logic repeatedly to all the elements. Yay!

Re: array literal element types

2009-11-13 Thread Steven Schveighoffer
On Thu, 12 Nov 2009 20:16:40 -0500, Robert Jacques wrote: On Thu, 12 Nov 2009 16:42:45 -0500, Walter Bright wrote: Currently, the type is determined by the type of the first element and the rest are implicitly cast to it. I propose changing it to being the type produced by applying th

Re: Named return type > Out parameters

2009-11-13 Thread grauzone
のしいか (noshiika) wrote: Bill Baxter さんは書きました: Did go do away with the comma sequencing operator? I can't find it. That's the first thing D needs to do. Otherwise a,b = function() is difficult to make work. How about redefining the comma operator as a "tuple constructor" with its precedence

Re: @safe leak fix?

2009-11-13 Thread Steven Schveighoffer
On Fri, 13 Nov 2009 07:01:25 -0500, Denis Koroskin <2kor...@gmail.com> wrote: On Fri, 13 Nov 2009 14:50:58 +0300, Steven Schveighoffer wrote: On Thu, 12 Nov 2009 18:34:48 -0500, Jason House wrote: Steven Schveighoffer Wrote: On Thu, 12 Nov 2009 08:45:36 -0500, Jason House wrote:

Re: Are out-of-class-declaration method definitions allowed?

2009-11-13 Thread bearophile
Steven Schveighoffer: > The theory being -- the compiler probably knows better what things are > good to inline. In practice, this sometimes isn't the case, but it's all > we have to work with right now. In LDC there's a way to tell the compiler that a function that contains asm is suitable

Re: Getting the error from __traits(compiles, ...)

2009-11-13 Thread grauzone
Yigal Chripun wrote: Bill Baxter wrote: On Thu, Nov 12, 2009 at 1:00 PM, Walter Bright wrote: Walter Bright wrote: Bill Baxter wrote: Any other thoughts about how to get the failure info? This is probably the main complaint against __traits(compiles), that there's no way to find out what w

Re: array literal element types

2009-11-13 Thread bearophile
Robert Jacques: > Given how numeric literals currently work: > vote-- > > for example currently: > float[] = [1.0f, 2.5, 5.6, 0.8].dup; > > under the proposal > float[] = [1.0f, 2.5f, 5.6f, 0.8f].dup; Yes, this proposal has some downsides too. You have to be careful regarding what you put insi

Re: Named return type > Out parameters

2009-11-13 Thread bearophile
Nick Sabalausky: >(Or if it even does function overloading at all, for that matter?)< Recently I have shown here the style guide of the C++ code used by Google. There are many forbidden (or nearly forbidden) things, like function overloading. So a ""system language"" designed by Google probably

  1   2   >