Article about problems & suggestions for D 2.0

2011-08-27 Thread Benjamin Thaut
After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benjamin-thaut.de/?p=18 Comments and criticism wel

Article about problems & suggestions for D 2.0

2011-08-27 Thread Benjamin Thaut
After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benjamin-thaut.de/?p=18 Comments and criticism wel

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread dsimcha
On 8/27/2011 1:14 PM, Benjamin Thaut wrote: After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benjamin-

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Walter Bright
On 8/27/2011 10:16 AM, Benjamin Thaut wrote: After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benjamin

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Christian Kamm
Benjamin Thaut wrote: > After having used the D 2.0 programming language for a year now and > having completed 3 projects with it, I wrote a small article about the > problems I had with the D 2.0 programming language and what suggestions > I have to improve it. > > http://3d.benjamin-thaut.de/?p

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Caligo
On Sat, Aug 27, 2011 at 12:39 PM, Walter Bright wrote: > On 8/27/2011 10:16 AM, Benjamin Thaut wrote: > >> After having used the D 2.0 programming language for a year now and having >> completed 3 projects with it, I wrote a small article about the problems I >> had >> with the D 2.0 programming l

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Nick Sabalausky
"Caligo" wrote in message news:mailman.2547.1314469962.14074.digitalmar...@puremagic.com... > On Sat, Aug 27, 2011 at 12:39 PM, Walter Bright > wrote: > >> >> I find it very hard to read. Can you boost the font size, please? Have >> pity >> on us old guys! >> > > Ctrl and + to increase the font

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Mehrdad
On 8/27/2011 10:14 AM, Benjamin Thaut wrote: After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benja

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Chris Molozian
Hope this works. Just click this link: Ingrater%u2019s 3D Blog ï¿1/2 Suggestions for the D 2.0 Programming Language Sent from Readability

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Benjamin Thaut
Am 27.08.2011 19:39, schrieb Walter Bright: On 8/27/2011 10:16 AM, Benjamin Thaut wrote: After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggesti

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Walter Bright
On 8/27/2011 12:29 PM, Benjamin Thaut wrote: Am 27.08.2011 19:39, schrieb Walter Bright: I find it very hard to read. Can you boost the font size, please? Have pity on us old guys! Increased the font size a bit, I hope it is better that way Better, but still a strain to read. The browser's d

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Walter Bright
On 8/27/2011 11:32 AM, Caligo wrote: Ctrl and + to increase the font size. should work on any browser. Thanks, I didn't know that. Tried it, it works.

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Daniel Murphy
"Mehrdad" wrote in message news:j3beu2$25a8$1...@digitalmars.com... > Related suggestion: All methods that return /new/ strings should return > *mutable* arrays. There's really no reason (that I can think of) to not do > this: if you see something returning a mutable array, you _know_ it's a >

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread dsimcha
On 8/27/2011 3:47 PM, Daniel Murphy wrote: "Mehrdad" wrote in message news:j3beu2$25a8$1...@digitalmars.com... Related suggestion: All methods that return /new/ strings should return *mutable* arrays. There's really no reason (that I can think of) to not do this: if you see something returning

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Mehrdad
Weird... is it just me, or is my reply not appearing in the posts? (I'm using Thunderbird... I CAN see my post on the HTTP version, but not on Thunderbird. Ideas?) (Sorry for the meta-spam...) On 8/27/2011 12:01 PM, Mehrdad wrote: On 8/27/2011 10:14 AM, Benjamin Thaut wrote: After having used

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread bearophile
Mehrdad: > "With transitivity, there is no way to have a const pointer to mutable int." > > But... so what? Maybe it should actually explain the benefit, since I > can't figure it out on my own. D wants both mutable data and (strongly) pure functions. How do you bridge such two worlds? If you

Re: Article about problems & suggestions for D 2.0

2011-08-27 Thread Jonathan M Davis
On Saturday, August 27, 2011 12:01:21 Mehrdad wrote: > On 8/27/2011 10:14 AM, Benjamin Thaut wrote: > > After having used the D 2.0 programming language for a year now and > > having completed 3 projects with it, I wrote a small article about the > > problems I had with the D 2.0 programming langua

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Mehrdad
On 8/27/2011 1:39 PM, Mehrdad wrote: Weird... is it just me, or is my reply not appearing in the posts? (I'm using Thunderbird... I CAN see my post on the HTTP version, but not on Thunderbird. Ideas?) (Sorry for the meta-spam...) On 8/27/2011 12:01 PM, Mehrdad wrote: On 8/27/2011 10:14 AM, B

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread bearophile
dsimcha: >Some of the things you mention are definitely bugs. (I'd call emplace >requiring exact c'tor arguments, TID not supporting shared, the thread-local >storage/GC issue, and maybe no function overloading with template parameters >bugs. The TLS issue is already known.) These have a lot

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Daniel Murphy
"dsimcha" wrote in message news:j3bk94$2e72$1...@digitalmars.com... >> >> Since a few days ago, mutable strings returned from strongly pure >> functions >> can be implicitly converted to immutable ones, so a cast won't be needed >> any >> more. > > Does the same apply to all arrays of primitive

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Walter Bright
On 8/27/2011 10:30 AM, dsimcha wrote: Walter Bright is an idiot, I'm sorry about that :-)

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Alex Rønne Petersen
On 28-08-2011 01:05, bearophile wrote: Mehrdad: "With transitivity, there is no way to have a const pointer to mutable int." But... so what? Maybe it should actually explain the benefit, since I can't figure it out on my own. D wants both mutable data and (strongly) pure functions. How do yo

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread David Nadlinger
On 8/28/11 8:54 PM, Alex Rønne Petersen wrote: const_cast is the root of all evil. I really don't want to see it in D. - Alex It is already in D, and in an, in my personal opinion, much worse way: You can just cast away const/immutable with cast(). What do you propose for the situations whe

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Walter Bright
On 8/28/2011 12:44 PM, David Nadlinger wrote: It is already in D, and in an, in my personal opinion, much worse way: You can just cast away const/immutable with cast(). True, but such is explicitly undefined behavior, and is not allowed in safe mode. What do you propose for the situations w

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Andrei Alexandrescu
On 08/28/2011 02:44 PM, David Nadlinger wrote: On 8/28/11 8:54 PM, Alex Rønne Petersen wrote: const_cast is the root of all evil. I really don't want to see it in D. - Alex It is already in D, and in an, in my personal opinion, much worse way: You can just cast away const/immutable with cast(

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread dsimcha
On 8/28/2011 4:52 PM, Andrei Alexandrescu wrote: It is quite easy to define C++-like cast operators as D functions. If there's enough demand for that, we may include such in the standard library. Andrei I think we should define at least the following and probably put them in std.conv, since t

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread bearophile
Andrei Alexandrescu: > It is quite easy to define C++-like cast operators as D functions. If > there's enough demand for that, we may include such in the standard library. I'd like this one in Phobos: http://d.puremagic.com/issues/show_bug.cgi?id=5559 Having it in Phobos is hopefully better tha

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Mafi
Am 28.08.2011 23:13, schrieb dsimcha: On 8/28/2011 4:52 PM, Andrei Alexandrescu wrote: It is quite easy to define C++-like cast operators as D functions. If there's enough demand for that, we may include such in the standard library. Andrei I think we should define at least the following and

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread David Nadlinger
On 8/28/11 10:17 PM, Walter Bright wrote: On 8/28/2011 12:44 PM, David Nadlinger wrote: I know that this is not the general consensus, but I very much like the C++ casting operators, because you can quickly get a rough idea what is going on when you see a cast in the code, whereas for D, cast()

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread dsimcha
On 8/28/2011 5:18 PM, Mafi wrote: dynamicCast: Cast a class to another. This should throw something derived from Error (not Exception) on failure instead of just returning null. If you want null, just use the cast operator. Maybe we should change its name, though. How about checkedCast or downCas

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Andrei Alexandrescu
On 08/28/2011 04:31 PM, dsimcha wrote: On 8/28/2011 5:18 PM, Mafi wrote: dynamicCast: Cast a class to another. This should throw something derived from Error (not Exception) on failure instead of just returning null. If you want null, just use the cast operator. Maybe we should change its name,

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Andrei Alexandrescu
On 08/27/2011 12:14 PM, Benjamin Thaut wrote: After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benjami

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread David Nadlinger
On 8/28/11 10:52 PM, Andrei Alexandrescu wrote: It is quite easy to define C++-like cast operators as D functions. If there's enough demand for that, we may include such in the standard library. I hope this finally goes through, there still seem to be some – hurricane-related, probably – stabi

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread bearophile
Andrei Alexandrescu: > Reddit discussion has turned to tuples: boost::tuples::tie is ugly compared to the syntax proposed in that pull request. > They work well except when expanding to multiple variables, There are two more places where it's handy to expand tuples: function signatures and for

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Walter Bright
On 8/28/2011 3:56 PM, David Nadlinger wrote: I hope this finally goes through, there still seem to be some – hurricane-related, probably – stability issues with the server. The only stability issue was the massive power outage. Jan got it back up running using a generator. Jan has always don

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread David Nadlinger
On 8/29/11 1:27 AM, Walter Bright wrote: On 8/28/2011 3:56 PM, David Nadlinger wrote: I hope this finally goes through, there still seem to be some – hurricane-related, probably – stability issues with the server. The only stability issue was the massive power outage. Jan got it back up runnin

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Walter Bright
On 8/28/2011 4:34 PM, David Nadlinger wrote: On 8/29/11 1:27 AM, Walter Bright wrote: On 8/28/2011 3:56 PM, David Nadlinger wrote: I hope this finally goes through, there still seem to be some – hurricane-related, probably – stability issues with the server. The only stability issue was the m

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Andrei Alexandrescu
On 8/27/11 12:14 PM, Benjamin Thaut wrote: After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benjamin-t

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread kennytm
Andrei Alexandrescu wrote: > On 8/27/11 12:14 PM, Benjamin Thaut wrote: >> After having used the D 2.0 programming language for a year now and >> having completed 3 projects with it, I wrote a small article about the >> problems I had with the D 2.0 programming language and what suggestions >> I h

Re: Article about problems & suggestions for D 2.0

2011-08-28 Thread Marco Leise
Am 29.08.2011, 05:44 Uhr, schrieb kennytm : On the pattern matching syntax for templates in the comments -- Sigh, the spec gotta advertise this valid syntax in the operator overloading page more: Foo opBinary(string op:"+")(...) { ... } Is 'more' an euphemism? ;) Good to know this syntax

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread bearophile
One of the comments written by Walter: >Few programmers stuff so much on one line that it becomes difficult picking >out the error.< If you write D code in functional-style then lines of code often become quite long. Bye, bearophile

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Andrej Mitrovic
On 8/29/11, kennytm wrote: > On the pattern matching syntax for templates in the comments -- Sigh, the > spec gotta advertise this valid syntax in the operator overloading page > more: > > Foo opBinary(string op:"+")(...) { ... } > Wow I didn't know about this. So now I can do this: enum Foo

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Alex Rønne Petersen
On 29-08-2011 18:15, Andrej Mitrovic wrote: On 8/29/11, kennytm wrote: On the pattern matching syntax for templates in the comments -- Sigh, the spec gotta advertise this valid syntax in the operator overloading page more: Foo opBinary(string op:"+")(...) { ... } Wow I didn't know abou

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Timon Gehr
On 08/29/2011 06:30 PM, Alex Rønne Petersen wrote: On 29-08-2011 18:15, Andrej Mitrovic wrote: On 8/29/11, kennytm wrote: On the pattern matching syntax for templates in the comments -- Sigh, the spec gotta advertise this valid syntax in the operator overloading page more: Foo opBinary(string

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Andrej Mitrovic
Oh man wouldn't it be cool if we could use this syntax like this: void test(R1:isInputRange, R2:isForwardRange)(R1 r1, R2 r2) {} I'm not sure how that would work with multiple constraints or constraints that need comparisons, e.g. ElementType: void test(R1:isInputRange && ElementType == int, R2:

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Martin Nowak
On Mon, 29 Aug 2011 18:55:56 +0200, Andrej Mitrovic wrote: Oh man wouldn't it be cool if we could use this syntax like this: void test(R1:isInputRange, R2:isForwardRange)(R1 r1, R2 r2) {} I'm not sure how that would work with multiple constraints or constraints that need comparisons, e.g. E

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Timon Gehr
On 08/29/2011 07:44 PM, Martin Nowak wrote: On Mon, 29 Aug 2011 18:55:56 +0200, Andrej Mitrovic wrote: Oh man wouldn't it be cool if we could use this syntax like this: void test(R1:isInputRange, R2:isForwardRange)(R1 r1, R2 r2) {} I'm not sure how that would work with multiple constraints o

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Andrei Alexandrescu
On 8/29/11 1:39 PM, Timon Gehr wrote: On 08/29/2011 07:44 PM, Martin Nowak wrote: On Mon, 29 Aug 2011 18:55:56 +0200, Andrej Mitrovic wrote: Oh man wouldn't it be cool if we could use this syntax like this: void test(R1:isInputRange, R2:isForwardRange)(R1 r1, R2 r2) {} I'm not sure how that

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Timon Gehr
On 08/29/2011 08:59 PM, Andrei Alexandrescu wrote: On 8/29/11 1:39 PM, Timon Gehr wrote: On 08/29/2011 07:44 PM, Martin Nowak wrote: On Mon, 29 Aug 2011 18:55:56 +0200, Andrej Mitrovic wrote: Oh man wouldn't it be cool if we could use this syntax like this: void test(R1:isInputRange, R2:isF

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Andrej Mitrovic
Yeah it's not important. But I'll definitely use the colon syntax more often now.

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Benjamin Thaut
I hoped for a little bit more feedback about the article itself. Especially about the move constructor I suggested. Does anyone see a need for this, or is it just me? -- Kind Regards Benjamin Thaut

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Walter Bright
On 8/27/2011 10:14 AM, Benjamin Thaut wrote: Comments and criticism welcome This guy wants to contact you: http://www.reddit.com/r/programming/comments/jwkvx/suggestions_for_the_d_20_programming_language/c2g2wos

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Jonathan M Davis
On Monday, August 29, 2011 13:35 Benjamin Thaut wrote: > I hoped for a little bit more feedback about the article itself. > Especially about the move constructor I suggested. Does anyone see a > need for this, or is it just me? Honestly, I find the fact that you're writing code which relies on the

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Walter Bright
On 8/29/2011 2:22 PM, Jonathan M Davis wrote: Certainly, for the common case, adding move constructors is a needless complication, and I'd _very_ leery of the ramifications of the compiler not being able to rely on a move having the bits stay absolutely identical (and a move constructor would mak

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Andrei Alexandrescu
On 8/29/11 4:36 PM, Walter Bright wrote: On 8/29/2011 2:22 PM, Jonathan M Davis wrote: Certainly, for the common case, adding move constructors is a needless complication, and I'd _very_ leery of the ramifications of the compiler not being able to rely on a move having the bits stay absolutely i

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Stephan Soller
On 27.08.2011 19:16, Benjamin Thaut wrote: After having used the D 2.0 programming language for a year now and having completed 3 projects with it, I wrote a small article about the problems I had with the D 2.0 programming language and what suggestions I have to improve it. http://3d.benjamin-t

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Jonathan M Davis
On Tuesday, August 30, 2011 03:44:33 Stephan Soller wrote: > On 27.08.2011 19:16, Benjamin Thaut wrote: > > After having used the D 2.0 programming language for a year now and > > having completed 3 projects with it, I wrote a small article about the > > problems I had with the D 2.0 programming la

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Andrej Mitrovic
On 8/30/11, Jonathan M Davis wrote: > But > it's > definitely true that allowing overloads between templatized and > non-templatized > functions would be an improvement. Hopefully, we get it at some point. Seeing as example code that uses such overloading is already in TDPL, this is probably only

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Benjamin Thaut
Am 30.08.2011 02:56, schrieb Andrei Alexandrescu: On 8/29/11 4:36 PM, Walter Bright wrote: On 8/29/2011 2:22 PM, Jonathan M Davis wrote: Certainly, for the common case, adding move constructors is a needless complication, and I'd _very_ leery of the ramifications of the compiler not being able

Re: Article about problems & suggestions for D 2.0

2011-08-29 Thread Andrei Alexandrescu
On 8/30/11 12:45 AM, Benjamin Thaut wrote: Am 30.08.2011 02:56, schrieb Andrei Alexandrescu: On 8/29/11 4:36 PM, Walter Bright wrote: On 8/29/2011 2:22 PM, Jonathan M Davis wrote: Certainly, for the common case, adding move constructors is a needless complication, and I'd _very_ leery of the r

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Kagamin
Mehrdad Wrote: > I feel like you hit the nail on the head. I feel the same way about const. > > Transitivity is beautiful on the outside, but I can never actually get > it working, so I just make everything non-const. I have to sometimes do > this even in Phobos itself, because the compiler com

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Trass3r
But it's definitely true that allowing overloads between templatized and non-templatized functions would be an improvement. Hopefully, we get it at some point. In the end this is not an "enhancement" but it is *required* to do proper D2 style operator overloading.

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Kagamin
Nick Sabalausky Wrote: > I like Ctrl-ScrollWheel. Don't know if that's cross-browser, though. Works > on FF. The font size on that page is pretty small though, I had to increase > it a few clicks. But it was a nice change from so many of the newer sites > these days that have everything cranked

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Sean Kelly
On Aug 27, 2011, at 10:14 AM, Benjamin Thaut wrote: > After having used the D 2.0 programming language for a year now and having > completed 3 projects with it, I wrote a small article about the problems I > had with the D 2.0 programming language and what suggestions I have to > improve it. "

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Sean Kelly
On Aug 27, 2011, at 10:14 AM, Benjamin Thaut wrote: > After having used the D 2.0 programming language for a year now and having > completed 3 projects with it, I wrote a small article about the problems I > had with the D 2.0 programming language and what suggestions I have to > improve it. H

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread dsimcha
== Quote from Sean Kelly (s...@invisibleduck.org)'s article > I really need to fix this. It's a pain though, for the reasons related > to the ones you mention in "5. Shared". A tid, for example, fronts a > message queue object that has some shared interface elements and some > unshared interface

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Sean Kelly
On Aug 30, 2011, at 1:41 PM, dsimcha wrote: > == Quote from Sean Kelly (s...@invisibleduck.org)'s article >> I really need to fix this. It's a pain though, for the reasons related >> to the ones you mention in "5. Shared". A tid, for example, fronts a >> message queue object that has some shared

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread dsimcha
On 8/30/2011 8:01 PM, Sean Kelly wrote: I'd like to say that the 'shared' attribute on member functions should just mean "make this member visible through a shared reference" and do away with the memory barriers idea entirely, except that D really does need some form of atomics. I'm really n

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread dsimcha
On 8/30/2011 8:01 PM, Sean Kelly wrote: I'd like to say that the 'shared' attribute on member functions should just mean "make this member visible through a shared reference" So the idea would just be that shared is a programmer-verified seal of approval that "yes, this is thread-safe without

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Michel Fortin
On 2011-08-31 00:01:09 +, Sean Kelly said: I'd like to say that the 'shared' attribute on member functions should just mean "make this member visible through a shared reference" and do away with the memory barriers idea entirely, except that D really does need some form of atomics. I'm rea

Re: Article about problems & suggestions for D 2.0

2011-08-30 Thread Benjamin Thaut
Am 29.08.2011 23:12, schrieb Walter Bright: On 8/27/2011 10:14 AM, Benjamin Thaut wrote: Comments and criticism welcome This guy wants to contact you: http://www.reddit.com/r/programming/comments/jwkvx/suggestions_for_the_d_20_programming_language/c2g2wos Thanks for the heads up -- Kind

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Kagamin
Sean Kelly Wrote: > The shared portion, rather than labeling functions as synchronized, uses > synchronized internally to make the mutex use as fine-grained as possible. > And the logically unshared portion only synchronizes when accessing the > shared data in the object. What's the differenc

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Sean Kelly
I meant atomic types, though I could probably be convinced otherwise. Sent from my iPhone On Aug 30, 2011, at 5:25 PM, dsimcha wrote: > On 8/30/2011 8:01 PM, Sean Kelly wrote: > >> I'd like to say that the 'shared' attribute on member functions should just >> mean "make this member visible th

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Sean Kelly
The effect on storage for statics is fantastic. I wasn't suggesting changing that, if that's what you meant. Sent from my iPhone On Aug 30, 2011, at 5:42 PM, Michel Fortin wrote: > On 2011-08-31 00:01:09 +, Sean Kelly said: > >> I'd like to say that the 'shared' attribute on member func

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Sean Kelly
The unshared methods are only ever meant to be called by the queue owner. They access some member data without synchronization to make the queue efficient for receive calls. I could make these methods shared anyway, but if they were called concurrently by accident it would mean data corruption.

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Sean Kelly
That would be the easiest thing, yeah. I had some more complex ideas in the concurrency list, but dunno if they're practical. Sent from my iPhone On Aug 30, 2011, at 5:37 PM, dsimcha wrote: > On 8/30/2011 8:01 PM, Sean Kelly wrote: >> I'd like to say that the 'shared' attribute on member func

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Benjamin Thaut
Am 30.08.2011 08:00, schrieb Andrei Alexandrescu: On 8/30/11 12:45 AM, Benjamin Thaut wrote: Am 30.08.2011 02:56, schrieb Andrei Alexandrescu: On 8/29/11 4:36 PM, Walter Bright wrote: On 8/29/2011 2:22 PM, Jonathan M Davis wrote: Certainly, for the common case, adding move constructors is a n

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Kagamin
Sean Kelly Wrote: > The unshared methods are only ever meant to be called by the queue owner. > They access some member data without synchronization to make the queue > efficient for receive calls. I could make these methods shared anyway, but if > they were called concurrently by accident it w

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Sean Kelly
On Aug 31, 2011, at 11:36 AM, Kagamin wrote: > Sean Kelly Wrote: > >> The unshared methods are only ever meant to be called by the queue owner. >> They access some member data without synchronization to make the queue >> efficient for receive calls. I could make these methods shared anyway, but

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Mehrdad
On 8/28/2011 2:49 PM, Andrei Alexandrescu wrote: On 08/28/2011 04:31 PM, dsimcha wrote: On 8/28/2011 5:18 PM, Mafi wrote: dynamicCast: Cast a class to another. This should throw something derived from Error (not Exception) on failure instead of just returning null. If you want null, just use

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Walter Bright
On 8/31/2011 9:58 AM, Benjamin Thaut wrote: Currently there is no way to track the references or pointers on the stack because the language does not include such a feature, nor can it be build with any of the language provided mechanisms. The trouble with precise GC is that all the type info co

Re: Article about problems & suggestions for D 2.0

2011-08-31 Thread Josh Simmons
On Thu, Sep 1, 2011 at 3:23 PM, Walter Bright wrote: > > And note that if you've got hard real time constraints, you cannot even use > malloc/free, as they do not run in bounded time. > They're generally avoided in game code anyway because they're slow. Games don't have hard real time constraint

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Mehrdad
On 8/31/2011 10:23 PM, Walter Bright wrote: On 8/31/2011 9:58 AM, Benjamin Thaut wrote: Currently there is no way to track the references or pointers on the stack because the language does not include such a feature, nor can it be build with any of the language provided mechanisms. The troub

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Andrei Alexandrescu
On 09/01/2011 12:23 AM, Walter Bright wrote: On 8/31/2011 9:58 AM, Benjamin Thaut wrote: Currently there is no way to track the references or pointers on the stack because the language does not include such a feature, nor can it be build with any of the language provided mechanisms. The troubl

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Andrei Alexandrescu
On 09/01/2011 12:06 AM, Mehrdad wrote: On 8/28/2011 2:49 PM, Andrei Alexandrescu wrote: On 08/28/2011 04:31 PM, dsimcha wrote: On 8/28/2011 5:18 PM, Mafi wrote: dynamicCast: Cast a class to another. This should throw something derived from Error (not Exception) on failure instead of just retur

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s > I think our community will be rid of a major hurdle once we get past the > debate on whether precise GC is necessary. Precise GC is necessary, > there's no two ways about it. We should worry about implementing, not > debating, it

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Sean Kelly
There are soft realtime GCs like you describe, but I believe they're all incremental. I don't know that approach is compatible with D. Sent from my iPhone On Aug 31, 2011, at 10:35 PM, Josh Simmons wrote: > On Thu, Sep 1, 2011 at 3:23 PM, Walter Bright > wrote: >> >> And note that if you've

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Sean Kelly
Yup. I want to revisit CDGC to see if it's up to snuff as the default GC. It already supports precise scanning, so perhaps the rest can be sorted via library code: create!T(...) Sent from my iPhone On Sep 1, 2011, at 7:56 AM, dsimcha wrote: > == Quote from Andrei Alexandrescu (seewebsiteforem

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Alex Rønne Petersen
On 01-09-2011 16:42, Andrei Alexandrescu wrote: On 09/01/2011 12:23 AM, Walter Bright wrote: On 8/31/2011 9:58 AM, Benjamin Thaut wrote: Currently there is no way to track the references or pointers on the stack because the language does not include such a feature, nor can it be build with any

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Walter Bright
On 8/30/2011 5:01 PM, Sean Kelly wrote: I'd like to say that the 'shared' attribute on member functions should just mean "make this member visible through a shared reference" and do away with the memory barriers idea entirely, except that D really does need some form of atomics. I'm really not s

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Robert Jacques
On Thu, 01 Sep 2011 11:46:32 -0400, Sean Kelly wrote: Yup. I want to revisit CDGC to see if it's up to snuff as the default GC. It already supports precise scanning, so perhaps the rest can be sorted via library code: create!T(...) Sent from my iPhone Default on *nix you mean, as CDGC sadl

Re: Article about problems & suggestions for D 2.0

2011-09-01 Thread Robert Jacques
On Thu, 01 Sep 2011 10:56:27 -0400, dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s I think our community will be rid of a major hurdle once we get past the debate on whether precise GC is necessary. Precise GC is necessary, there's no two ways about it. We s

Re: Article about problems & suggestions for D 2.0

2011-09-02 Thread Sean Kelly
On Sep 1, 2011, at 7:57 PM, Robert Jacques wrote: > On Thu, 01 Sep 2011 11:46:32 -0400, Sean Kelly wrote: >> Yup. I want to revisit CDGC to see if it's up to snuff as the default GC. It >> already supports precise scanning, so perhaps the rest can be sorted via >> library code: create!T(...) >

Re: Article about problems & suggestions for D 2.0

2011-09-02 Thread Robert Jacques
On Fri, 02 Sep 2011 13:34:12 -0400, Sean Kelly wrote: On Sep 1, 2011, at 7:57 PM, Robert Jacques wrote: On Thu, 01 Sep 2011 11:46:32 -0400, Sean Kelly wrote: Yup. I want to revisit CDGC to see if it's up to snuff as the default GC. It already supports precise scanning, so perhaps the rest