Re: D library projects : adopting Boost license

2009-11-12 Thread Robert Jacques
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: " It forbids you to: redistribute any piece of Apache-originated software without proper at

Re: Semantics of toString

2009-11-12 Thread Yigal Chripun
Steven Schveighoffer wrote: On Thu, 12 Nov 2009 17:13:06 -0500, Andrei Alexandrescu wrote: Bill Baxter wrote: On Thu, Nov 12, 2009 at 1:54 PM, Andrei Alexandrescu wrote: Let's not forget that this is mainly for debugging... If it's mainly for debugging maybe it's not worth spending time

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

2009-11-12 Thread Yigal Chripun
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 went wrong if the code

Re: D library projects : adopting Boost license

2009-11-12 Thread Yigal Chripun
Robert Jacques wrote: The Apache 2.0 license requires attribution. It's therefore unsuitable for a standard library. From the website FAQ: " It forbids you to: redistribute any piece of Apache-originated software without proper attribution; use any marks owned by The Apache Software Foundatio

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

2009-11-12 Thread BCS
Hello Justin, Leandro Lucarella Wrote: Justin Johansson, el 12 de noviembre a las 21:40 me escribiste: Adam D. Ruppe Wrote: On Thu, Nov 12, 2009 at 11:12:49PM -0300, Leandro Lucarella wrote: Do you see any reasons not to do that? I think it happens very often to stop using some import an

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

2009-11-12 Thread BCS
Hello aJ, I can't imagine anyone that knows D doesn't also know C++, but the opposite is hardly true, so here's some valid C++ that I'm wondering if there is an equivalent style allowed in D: class MyClass { public: void DoIt(); }; void MyClass::DoIt() { // do it } (Aside: D has no 'inline' key

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

2009-11-12 Thread Nick Sabalausky
"Justin Johansson" wrote in message news:hdin02$33...@digitalmars.com... > Nick Sabalausky Wrote: > >> >> "Justin Johansson" wrote in message >> news:hdikl4$2rg...@digitalmars.com... >> > Andrei Alexandrescu Wrote: >> >> >> >> I think this is an environment issue. I like Eclipse's approach. Java

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

2009-11-12 Thread Ellery Newcomer
AJ wrote: >I can't imagine anyone that knows D doesn't also know C++, but the > opposite is hardly true, so here's some valid C++ that I'm wondering if > there is an equivalent style allowed in D: > > class MyClass > { > public: >void DoIt(); > }; > > void MyClass::DoIt() > { > //

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

2009-11-12 Thread Justin Johansson
Nick Sabalausky Wrote: > > "Justin Johansson" wrote in message > news:hdikl4$2rg...@digitalmars.com... > > 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. > >> > >> > >> Andr

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

2009-11-12 Thread Nick Sabalausky
"Phil Deets" wrote in message news:op.u3bfg4rz1py...@desktop.neo.rr.com... > On Thu, 12 Nov 2009 21:12:49 -0500, 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 imple

Re: Named return type > Out parameters

2009-11-12 Thread Ellery Newcomer
のしいか (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"

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

2009-11-12 Thread Phil Deets
On Thu, 12 Nov 2009 21:12:49 -0500, 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

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

2009-11-12 Thread AJ
I can't imagine anyone that knows D doesn't also know C++, but the opposite is hardly true, so here's some valid C++ that I'm wondering if there is an equivalent style allowed in D: class MyClass { public: void DoIt(); }; void MyClass::DoIt() { // do it } (Aside: D has no 'inlin

Re: Named return type > Out parameters

2009-11-12 Thread Nick Sabalausky
"Leandro Lucarella" wrote in message news:20091113031715.gd8...@llucax.com.ar... > Nick Sabalausky, el 12 de noviembre a las 22:13 me escribiste: >> "xx" wrote in message news:hdidi8$213...@digitalmars.com... >> > Next in the series of "How about Go's ": >> > >> > (int var1, float var2) func

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

2009-11-12 Thread Nick Sabalausky
"Justin Johansson" wrote in message news:hdiliv$2ur...@digitalmars.com... > Leandro Lucarella Wrote: > >> Justin Johansson, el 12 de noviembre a las 21:40 me escribiste: >> > Adam D. Ruppe Wrote: >> > >> > > On Thu, Nov 12, 2009 at 11:12:49PM -0300, Leandro Lucarella wrote: >> > > > Do you see an

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

2009-11-12 Thread Nick Sabalausky
"Justin Johansson" wrote in message news:hdikl4$2rg...@digitalmars.com... > 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. >> >> >> Andrei > > I don't like to engage in unnecessary

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

2009-11-12 Thread Justin Johansson
Leandro Lucarella Wrote: > Justin Johansson, el 12 de noviembre a las 21:40 me escribiste: > > Adam D. Ruppe Wrote: > > > > > On Thu, Nov 12, 2009 at 11:12:49PM -0300, Leandro Lucarella wrote: > > > > Do you see any reasons not to do that? I think it happens very often to > > > > stop using some

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

2009-11-12 Thread Justin Johansson
Andrei Alexandrescu Wrote: > Justin Johansson 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 t

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

2009-11-12 Thread Walter Bright
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 imports to get it to compiler. First off, I tend to have "all" imports that

Re: Named return type > Out parameters

2009-11-12 Thread Leandro Lucarella
Nick Sabalausky, el 12 de noviembre a las 22:13 me escribiste: > "xx" wrote in message news:hdidi8$213...@digitalmars.com... > > Next in the series of "How about Go's ": > > > > (int var1, float var2) function(); > > > > is much nicer, logical and consistent than: > > > > int function(out floa

Re: Named return type > Out parameters

2009-11-12 Thread Nick Sabalausky
"xx" wrote in message news:hdidi8$213...@digitalmars.com... > Next in the series of "How about Go's ": > > (int var1, float var2) function(); > > is much nicer, logical and consistent than: > > int function(out float var2); > > > Of course this requires multiple assignment, but that's another

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

2009-11-12 Thread Leandro Lucarella
Justin Johansson, el 12 de noviembre a las 21:40 me escribiste: > Adam D. Ruppe Wrote: > > > On Thu, Nov 12, 2009 at 11:12:49PM -0300, Leandro Lucarella wrote: > > > Do you see any reasons not to do that? I think it happens very often to > > > stop using some import and never notice it. > > > > I

Re: Go: A new system programing language

2009-11-12 Thread Walter Bright
Mike Hearn wrote: Whenever I give a talk on D, I start out by asking the audience who has heard of it. In the last few years, nearly everyone raises their hand. For what it's worth there's a segment of the Google engineering community that would love to use D internally (I'm one of them). Go i

Re: Named return type > Out parameters

2009-11-12 Thread のしいか (noshiika)
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 unchanged? In so doing

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

2009-11-12 Thread Andrei Alexandrescu
Justin Johansson 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 used, to avoid unnecessary dependencies.

Re: array literal element types

2009-11-12 Thread Robert Jacques
On Thu, 12 Nov 2009 21:03:04 -0500, Chad J wrote: 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

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

2009-11-12 Thread Justin Johansson
Adam D. Ruppe Wrote: > On Thu, Nov 12, 2009 at 11:12:49PM -0300, Leandro Lucarella wrote: > > Do you see any reasons not to do that? I think it happens very often to > > stop using some import and never notice it. > > I'll often import std.stdio when doing printf/writefln debugging. It'd be > rea

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

2009-11-12 Thread Justin Johansson
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 an

The AMD Advanced Synchronization Facility (ASF) - perhaps of interest to the D programming community ?

2009-11-12 Thread Nick B
Overview: The AMD Advanced Synchronization Facility (ASF) is an experimental instruction set extension for the AMD64 architecture that would provide new capabilities for efficient synchronization of access to shared data in highly multithreaded applications as well as operating system kernels

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

2009-11-12 Thread Adam D. Ruppe
On Thu, Nov 12, 2009 at 11:12:49PM -0300, Leandro Lucarella wrote: > Do you see any reasons not to do that? I think it happens very often to > stop using some import and never notice it. I'll often import std.stdio when doing printf/writefln debugging. It'd be really annoying if the compiler threw

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

2009-11-12 Thread 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 that's never used, to avoid unnecessary dependencies. Do you see any reasons not to do that? I think it hap

Re: D Kernel Development

2009-11-12 Thread Leandro Lucarella
Jesse Robinson, el 12 de noviembre a las 21:02 me escribiste: > > Sean Kelly: > > > Right. I think Walter meant that "new" would use the GC for allocation, > > > so stubbing out gc_malloc() entirely will break "new". I suggested > > > replacing the GC with a non-collecting allocator, something

Re: Named return type > Out parameters

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 5:42 PM, xx wrote: > Next in the series of "How about Go's ": > > (int var1, float var2) function(); > > is much nicer, logical and consistent than: > > int function(out float var2); > > > Of course this requires multiple assignment, but that's another cool thing. Did

Re: array literal element types

2009-11-12 Thread Chad J
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 al

Re: D Kernel Development

2009-11-12 Thread Jesse Robinson
bearophile Wrote: > Walter Bright: > >You'd need to avoid: > . resizing arrays > . associative arrays > . closures > . of course, any use of new > . array concatenation< > > > Sean Kelly: > > Right. I think Walter meant that "new" would use the GC for allocation, so > > stubbing out gc_malloc(

Re: array literal element types

2009-11-12 Thread Moritz Warning
On Thu, 12 Nov 2009 16:44:22 -0800, Walter Bright wrote: > Moritz Warning wrote: >> Would be nice to finally have this (low profile) feature. I think there >> was a discussion already but nothing happened. > > I heard you guys, it's just that there was so much else going on. We all feel that you

Named return type > Out parameters

2009-11-12 Thread xx
Next in the series of "How about Go's ": (int var1, float var2) function(); is much nicer, logical and consistent than: int function(out float var2); Of course this requires multiple assignment, but that's another cool thing.

Re: How about Go's &Struct instead of new?

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 5:32 PM, xx wrote: >> In Go (from what I understand), a struct is stack allocated with >>    x := Struct(); >> and heap allocated with >>    x := &Struct(); > > It's a nice trick, but I don't find it intuitive. Getting address of an > object (re)allocates it? Literal that

Re: array literal element types

2009-11-12 Thread Robert Jacques
On Thu, 12 Nov 2009 20:29:31 -0500, Bill Baxter wrote: On Thu, Nov 12, 2009 at 5:16 PM, 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 cha

Re: How about Go's &Struct instead of new?

2009-11-12 Thread xx
> In Go (from what I understand), a struct is stack allocated with >x := Struct(); > and heap allocated with >x := &Struct(); It's a nice trick, but I don't find it intuitive. Getting address of an object (re)allocates it? Literal that has different address each time?

Re: Go: A new system programing language

2009-11-12 Thread Robert Jacques
On Thu, 12 Nov 2009 15:01:24 -0500, Joel C. Salomon wrote: On 11/11/2009 8:47 PM, dsimcha wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article hasenj wrote: Do you think D would benefit if you add this (or similar) feature to it? Sean is working on a message passing

Re: array literal element types

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 5:29 PM, Bill Baxter wrote: > On Thu, Nov 12, 2009 at 5:16 PM, 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. >>> >>

Re: array literal element types

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 5:16 PM, 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

Re: array literal element types

2009-11-12 Thread Robert Jacques
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 elements. Given how numeri

Re: D library projects

2009-11-12 Thread Robert Jacques
On Thu, 12 Nov 2009 16:39:31 -0500, dsimcha wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article On Thu, 12 Nov 2009 15:48:27 -0500, dsimcha wrote: > == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article >> On Thu, 12 Nov 2009 14:40:10 -0500, Walter Bright >>

Re: D library projects

2009-11-12 Thread Robert Jacques
On Thu, 12 Nov 2009 16:19:24 -0500, Steven Schveighoffer wrote: I wouldn't waste any time trying to get Tango to change their license. Aside from being an almost insurmountable task to get all the developers to agree to do it, since the AFL allows permissions that are exactly in line with

Re: array literal element types

2009-11-12 Thread Walter Bright
Moritz Warning wrote: Would be nice to finally have this (low profile) feature. I think there was a discussion already but nothing happened. I heard you guys, it's just that there was so much else going on.

Re: D library projects : adopting Boost license

2009-11-12 Thread Robert Jacques
On Thu, 12 Nov 2009 17:31:21 -0500, Bill Baxter wrote: On Thu, Nov 12, 2009 at 2:17 PM, Walter Bright wrote: Jacob Carlborg wrote: It's being discussed here: http://www.dsource.org/projects/tango/forums/topic/786#3407 Thanks for the pointer. I see the discussion is about adopting the Ap

Re: array literal element types

2009-11-12 Thread Walter Bright
bearophile wrote: D is slowly improving. Lot of travel to do still. Actually, D is improving very rapidly. Just look at the change log.

Re: D library projects

2009-11-12 Thread Walter Bright
Florian Sonnenberger wrote: Walter Bright wrote: The library is under the creative commons license, which is different, though I haven't read it carefully. Are you sure? Every file of the lib I've looked at starts with: I stand corrected. I was looking at the documentation pages. // Copy

Re: @safe leak fix?

2009-11-12 Thread Robert Jacques
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 wrote: > At a fundamental level, safety isn't about pointers or references to > stack variables, but rather preventing their escape be

Re: Serialization + semantics of toString

2009-11-12 Thread Andrei Alexandrescu
aarti_pl wrote: I forgot to throw a link: http://www.dsource.org/projects/doost/browser/trunk/examples/util/serializer/FunctionTest.d Cool, do you also have documentation? Andrei

Re: Semantics of toString

2009-11-12 Thread HOSOKAWA Kenchi
Bill Baxter Wrote: > On Thu, Nov 12, 2009 at 10:46 AM, Andrei Alexandrescu > wrote: > >>> > >>> I'd agree with the delegate idea if we established that UTF-8 is favored > >>> compared to all other formats. > >> > >> D seems to favor UTF8 -- it is the default type for string literals. > >> I > >

Re: Serialization + semantics of toString

2009-11-12 Thread aarti_pl
I forgot to throw a link: http://www.dsource.org/projects/doost/browser/trunk/examples/util/serializer/FunctionTest.d BR Marcin Kuszczak (aarti_pl) aarti_pl pisze: Andrei Alexandrescu pisze: > But that being said, I'd so much want to start thinking of an actual > text serialization infrastru

Re: @safe leak fix?

2009-11-12 Thread Jason House
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, safety isn't about pointers or references to > >> > stack variables, but rather preventing their escape beyond function >

Serialization + semantics of toString

2009-11-12 Thread aarti_pl
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 might want to see my serialization libra

Re: array literal element types

2009-11-12 Thread Moritz Warning
On Thu, 12 Nov 2009 13:42:45 -0800, 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. vote++ Would be

Re: D library projects

2009-11-12 Thread Florian Sonnenberger
Walter Bright wrote: > The library is under the creative commons license, which is different, > though I haven't read it carefully. Are you sure? Every file of the lib I've looked at starts with: // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a B

Re: array literal element types

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 2:30 PM, bearophile wrote: > Walter Bright: >> I propose changing it to being the type produced by applying the ?: >> logic repeatedly to all the elements. > > A lot of time ago I have proposed that array literals use the type able to > contain all their items :-) > D is s

Re: array literal element types

2009-11-12 Thread bearophile
Walter Bright: > I propose changing it to being the type produced by applying the ?: > logic repeatedly to all the elements. A lot of time ago I have proposed that array literals use the type able to contain all their items :-) D is slowly improving. Lot of travel to do still. Bye, bearophile

Re: D library projects : adopting Boost license

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 2:17 PM, Walter Bright wrote: > Jacob Carlborg wrote: >> >> It's being discussed here: >> http://www.dsource.org/projects/tango/forums/topic/786#3407 > > Thanks for the pointer. I see the discussion is about adopting the Apache > license. I strongly suggest considering the

Re: D library projects

2009-11-12 Thread Walter Bright
jcc7 wrote: I don't want to rain on your parade, but attribution could be an issue. (I'm not sure where the license is for the library, so that text I found may only apply to the compiler.) The library is under the creative commons license, which is different, though I haven't read it carefull

Re: D library projects

2009-11-12 Thread Walter Bright
Bill Baxter wrote: Maybe they'll change it if someone points out to them that it's a lame requirement to have for a standard library. It's a deal breaker for a standard library, but I don't think that is the license used for the library.

Re: Semantics of toString

2009-11-12 Thread Steven Schveighoffer
On Thu, 12 Nov 2009 17:13:06 -0500, Andrei Alexandrescu wrote: Bill Baxter wrote: On Thu, Nov 12, 2009 at 1:54 PM, Andrei Alexandrescu wrote: Let's not forget that this is mainly for debugging... If it's mainly for debugging maybe it's not worth spending time on. Nonsense! Developers

Re: D library projects : adopting Boost license

2009-11-12 Thread Walter Bright
Jacob Carlborg wrote: It's being discussed here: http://www.dsource.org/projects/tango/forums/topic/786#3407 Thanks for the pointer. I see the discussion is about adopting the Apache license. I strongly suggest considering the Boost license, as it is very permissive, and Phobos has converted

Re: D library projects

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 2:09 PM, jcc7 wrote: > From http://golang.org/LICENSE: > > // Copyright (c) 2009 The Go Authors. All rights reserved. ... > //    * Redistributions in binary form must reproduce the above > // copyright notice, this list of conditions and the following > disclaimer > // in

Re: Semantics of toString

2009-11-12 Thread Andrei Alexandrescu
Bill Baxter wrote: On Thu, Nov 12, 2009 at 1:54 PM, Andrei Alexandrescu wrote: Let's not forget that this is mainly for debugging... If it's mainly for debugging maybe it's not worth spending time on. Nonsense! Developers spend a lot of time debugging. Helping people debug their programs

Re: array literal element types

2009-11-12 Thread Walter Bright
Andrei Alexandrescu wrote: Well take a number :o). It's been proposed by many and many times over. Glad to see you're looking into it. I know it has, I just wish to not make the change a surprise.

Re: D library projects

2009-11-12 Thread jcc7
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > For anyone looking for an easy, but valuable, contribution to D, > take a look at the go runtime library. > > There's a lot in there we could use in the D library: > > http://golang.org/pkg/ > > The library is licensed under the >

Re: Semantics of toString

2009-11-12 Thread Steven Schveighoffer
On Thu, 12 Nov 2009 16:54:13 -0500, Andrei Alexandrescu wrote: Let's not forget that this is mainly for debugging... If it's mainly for debugging maybe it's not worth spending time on. Debugging is not always done by the developer on his system where a debugger is available. The main

Re: array literal element types

2009-11-12 Thread Andrei Alexandrescu
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. Well take a number :o). It's been proposed by many and man

Re: Semantics of toString

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 1:54 PM, Andrei Alexandrescu wrote: >> Let's not forget that this is mainly for debugging... > > If it's mainly for debugging maybe it's not worth spending time on. Nonsense! Developers spend a lot of time debugging. Helping people debug their programs is certainly wort

Re: Semantics of toString

2009-11-12 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Thu, 12 Nov 2009 16:19:39 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Thu, 12 Nov 2009 14:40:12 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Thu, 12 Nov 2009 13:46:08 -0500, Andrei Alexandrescu wrote: From my C

Re: Go: A new system programing language

2009-11-12 Thread HOSOKAWA Kenchi
Walter Bright Wrote: > Bill Baxter wrote: > > It's harder to find those when you're skimming through trying to get > > the highlights with a 5 minute limit. :-) What are some things is it > > missing? > > Off the top of my head, some major ones: > > . exception handling > . generic programming

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

2009-11-12 Thread Walter Bright
Denis Koroskin wrote: He was asking for a string so that it would be possible to parse and/or output. More like: enum s = __traits(compiles_or_msg, ...); static if (s.length == 0) { // no error } else { // do stuff with error message } Makes sense.

Re: array literal element types

2009-11-12 Thread Bill Baxter
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! But if you wa

Re: D library projects

2009-11-12 Thread Walter Bright
Kyle wrote: Walter Bright Wrote: For anyone looking for an easy, but valuable, contribution to D, take a look at the go runtime library. ... Should we submit these kinds of things through bugzilla? What is the preferred method? That's a good question. Probably Bugzilla is the best ven

Re: array literal element types

2009-11-12 Thread Ellery Newcomer
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. second and third arguments are converted to a common

Re: D library projects

2009-11-12 Thread Walter Bright
Steven Schveighoffer wrote: I wouldn't waste any time trying to get Tango to change their license. Aside from being an almost insurmountable task to get all the developers to agree to do it, since the AFL allows permissions that are exactly in line with what the Tango devs want, I don't think

array literal element types

2009-11-12 Thread Walter Bright
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.

Re: Semantics of toString

2009-11-12 Thread Steven Schveighoffer
On Thu, 12 Nov 2009 16:19:39 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Thu, 12 Nov 2009 14:40:12 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Thu, 12 Nov 2009 13:46:08 -0500, Andrei Alexandrescu wrote: From my C++ book, it appears to onl

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

2009-11-12 Thread Bill Baxter
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 went wrong if the code

Re: D library projects

2009-11-12 Thread dsimcha
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article > On Thu, 12 Nov 2009 15:48:27 -0500, dsimcha wrote: > > == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article > >> On Thu, 12 Nov 2009 14:40:10 -0500, Walter Bright > >> wrote: > >> > grauzone wrote: > >> >> Ever hea

Re: D library projects

2009-11-12 Thread Jacob Carlborg
On 11/12/09 22:02, Walter Bright wrote: dsimcha wrote: It would be truly great if Tango could be used under a license with permissiveness equivalent to the Boost license. It would help mend a pretty significant rift in the D community that started over a minor technicality. Sean did a lot of s

Re: D library projects

2009-11-12 Thread Kyle
Walter Bright Wrote: > For anyone looking for an easy, but valuable, contribution to D, take a > look at the go runtime library. > > ... Should we submit these kinds of things through bugzilla? What is the preferred method?

Re: D library projects

2009-11-12 Thread Steven Schveighoffer
On Thu, 12 Nov 2009 15:48:27 -0500, dsimcha wrote: == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article On Thu, 12 Nov 2009 14:40:10 -0500, Walter Bright wrote: > grauzone wrote: >> Ever heard of Tango? > > Yes, and I'd be happy to: > > 1. have Tango available for D2 and work wi

Re: Semantics of toString

2009-11-12 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Thu, 12 Nov 2009 14:40:12 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Thu, 12 Nov 2009 13:46:08 -0500, Andrei Alexandrescu wrote: From my C++ book, it appears to only use virtual inheritance. I don't know enough about virtual inherit

Re: typedef redux

2009-11-12 Thread Walter Bright
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 ... D. typedef

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

2009-11-12 Thread Denis Koroskin
On Fri, 13 Nov 2009 00:00:42 +0300, 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 went wrong if the code doesn't compil

Re: D library projects

2009-11-12 Thread Walter Bright
Adam D. Ruppe wrote: I have some code that might be useful for these, that I've accumulated over time. Sounds like you've got a great start here!

Re: How about Go's &Struct instead of new? addendum

2009-11-12 Thread Justin Johansson
Justin Johansson Wrote: > Currently in my D projects I use static opCall to eliminate "new" (at least > for > classes) such as: > > class Foo > { > int x; > Foo( int x) { this.x = x; } > static Foo opCall( int x) { return new Foo( x); } > } > > I'm not sure if this considered good D style

Re: D library projects

2009-11-12 Thread Walter Bright
dsimcha wrote: It would be truly great if Tango could be used under a license with permissiveness equivalent to the Boost license. It would help mend a pretty significant rift in the D community that started over a minor technicality. Sean did a lot of searching, and found that the Boost lic

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

2009-11-12 Thread Walter Bright
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 went wrong if the code doesn't compile. Often it can just be a typo. I know I've spent plenty of

Re: D library projects

2009-11-12 Thread Yigal Chripun
Walter Bright wrote: For anyone looking for an easy, but valuable, contribution to D, take a look at the go runtime library. There's a lot in there we could use in the D library: http://golang.org/pkg/ The library is licensed under the http://creativecommons.org/licenses/by/3.0/ meaning we

Re: D library projects

2009-11-12 Thread dsimcha
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article > On Thu, 12 Nov 2009 14:40:10 -0500, Walter Bright > wrote: > > grauzone wrote: > >> Ever heard of Tango? > > > > Yes, and I'd be happy to: > > > > 1. have Tango available for D2 and work with Druntime. > > > > 2. move individual

Re: How about Go's &Struct instead of new?

2009-11-12 Thread Justin Johansson
Bill Baxter Wrote: > I fear there could be a long parade of these "How about Go's " > topics, but anyway, here goes... > > Mostly just a syntax bikeshed, but this seemed like a nice way to > eliminate the "new" syntax that wasn't mentioned previously. > They also kind of round out the dec

Re: Go: A new system programing language

2009-11-12 Thread Mike Hearn
> Whenever I give a talk on D, I start out by asking the audience who has > heard of it. In the last few years, nearly everyone raises their hand. For what it's worth there's a segment of the Google engineering community that would love to use D internally (I'm one of them). Go is still very n

Re: Semantics of toString

2009-11-12 Thread Steven Schveighoffer
On Thu, 12 Nov 2009 14:40:12 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Thu, 12 Nov 2009 13:46:08 -0500, Andrei Alexandrescu wrote: From my C++ book, it appears to only use virtual inheritance. I don't know enough about virtual inheritance to know how that chan

Re: Array literals REALLY should be immutable

2009-11-12 Thread Steven Schveighoffer
On Thu, 12 Nov 2009 14:46:29 -0500, Walter Bright wrote: Don wrote: Especially when it's creating an inconsistency with string literals. The inconsistency bothers me, too, but then there's the case: int x; ... [1, 2, x] That can't be made immutable. Shouldn't it work? There'

Re: Simple program fails to link - what am I doing wrong?

2009-11-12 Thread Mike Hearn
Denis Koroskin Wrote: > Function MyClass.b is not implemented (but is referenced, because it is > put into a virtual function table). Oh, duh, of course. Thanks. Would be nice to teach ld how to demangle D names.

  1   2   >