digitalmars.D - Article about problems & suggestions for D 2.0
- Benjamin Thaut (9/9) Aug 27 2011 After having used the D 2.0 programming language for a year now and
- Walter Bright (3/8) Aug 27 2011 I find it very hard to read. Can you boost the font size, please? Have p...
- Caligo (3/16) Aug 27 2011 Ctrl and + to increase the font size. should work on any browser.
- Nick Sabalausky (9/17) Aug 27 2011 I like Ctrl-ScrollWheel. Don't know if that's cross-browser, though. Wor...
- Kagamin (3/8) Aug 30 2011 Selecting View - Page Style - No Style fixes colors too
- Walter Bright (2/3) Aug 27 2011 Thanks, I didn't know that. Tried it, it works.
- Chris Molozian (7/20) Aug 27 2011 Hope this works.
- Benjamin Thaut (5/18) Aug 27 2011 Increased the font size a bit, I hope it is better that way
- Walter Bright (3/7) Aug 27 2011 Better, but still a strain to read. The browser's default font size is u...
- Christian Kamm (4/12) Aug 27 2011 About assert: you can probably set a breakpoint on onAssertError/
- Mehrdad (5/16) Aug 27 2011 Weird... is it just me, or is my reply not appearing in the posts? (I'm
- Mehrdad (3/19) Aug 27 2011 Oh whoops, my bad -- I sent it to the wrong thread apparently.
- Stephan Soller (42/48) Aug 29 2011 As for point no. 3 (Structs not having identity):
- Jonathan M Davis (13/37) Aug 29 2011 It's not called on _moves_. In a number of cases, the compiler moves a s...
- Trass3r (2/5) Aug 30 2011 In the end this is not an "enhancement" but it is *required* to do prope...
- Andrej Mitrovic (3/8) Aug 29 2011 Seeing as example code that uses such overloading is already in TDPL,
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 welcome -- Kind Regards Benjamin Thaut
Aug 27 2011
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-thaut.de/?p=18 Comments and criticism welcomeI find it very hard to read. Can you boost the font size, please? Have pity on us old guys!
Aug 27 2011
On Sat, Aug 27, 2011 at 12:39 PM, Walter Bright <newshound2 digitalmars.com>wrote:On 8/27/2011 10:16 AM, Benjamin Thaut wrote:Ctrl and + to increase the font size. should work on any browser.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 <http://3d.benjamin-thaut.de/?p=18> Comments and criticism welcomeI find it very hard to read. Can you boost the font size, please? Have pity on us old guys!
Aug 27 2011
"Caligo" <iteronvexor gmail.com> wrote in message news:mailman.2547.1314469962.14074.digitalmars-d puremagic.com...On Sat, Aug 27, 2011 at 12:39 PM, Walter Bright <newshound2 digitalmars.com>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 up so rediculously large it feels like you're trying to view the web through a pinhole. ------------------------------- Not sent from an iPhone.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 size. should work on any browser.
Aug 27 2011
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 up so rediculously large it feels like you're trying to view the web through a pinhole.Selecting View - Page Style - No Style fixes colors too :3
Aug 30 2011
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.
Aug 27 2011
Hope this works. Just click this link: Ingrater%u2019s 3D Blog ï¿1/2 Suggestions for the D 2.0 Programming Language <http://3d.benjamin-thaut.de/?p=18> ------------------------------------------------------------------------ Sent from Readability <http://lab.arc90.com/experiments/readability/> | An Arc90 <http://www.arc90.com> lab experiment On 08/27/11 18:39, 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 language and what suggestions I have to improve it. http://3d.benjamin-thaut.de/?p=18 Comments and criticism welcomeI find it very hard to read. Can you boost the font size, please? Have pity on us old guys!
Aug 27 2011
Am 27.08.2011 19:39, schrieb Walter Bright:On 8/27/2011 10:16 AM, Benjamin Thaut wrote:Increased the font size a bit, I hope it is better that way -- Kind Regards Benjamin ThautAfter 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 welcomeI find it very hard to read. Can you boost the font size, please? Have pity on us old guys!
Aug 27 2011
On 8/27/2011 12:29 PM, Benjamin Thaut wrote:Am 27.08.2011 19:39, schrieb Walter Bright:Better, but still a strain to read. The browser's default font size is usually the best size to use.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
Aug 27 2011
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=18 Comments and criticism welcomeAbout assert: you can probably set a breakpoint on onAssertError/ onAssertErrorMsg or use core.exception.setAssertHandler to override the throwing behavior (though that is deprecated).
Aug 27 2011
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 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 welcome<snip>
Aug 27 2011
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:Oh whoops, my bad -- I sent it to the wrong thread apparently. Really sorry about spamming! :(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.benjamin-thaut.de/?p=18 Comments and criticism welcome<snip>
Aug 27 2011
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-thaut.de/?p=18 Comments and criticism welcomeAs for point no. 3 (Structs not having identity): Structs have a postblit constructor. These have access to the new struct but not the old one. Maybe you can use this to register a new reference. If I remember this right the old reference should be cleaned up (unregistered) by the destructor but I'm not sure. You article implies that the destructor is not called for every copy of the struct. Point no. 5, "Shared": I actually had pretty much the same trouble with the syntax for shared delegates. The compiler output is very misleading. In the end this syntax mostly worked: shared(void delegate(const char[])) message_handler; Still had to cast away the shared on the rhs expression of an assigment. Maybe the full code can shed some light on this: // An array of message handlers private shared( shared(void delegate(const char[]))[] ) message_handlers; // Function to register new handlers public shared void hook(shared(void function(const char[])) message_handler){ typeof(message_handlers[0]) handler_dg; handler_dg.funcptr = cast(void function(const const(char[]))) message_handler; synchronized(mutex) message_handlers ~= handler_dg; } The typeof trick to define the handler_dg variable is there because nothing else seemed to work. I worked with Benjamin on the space shooter game. The above code is actually from the logger of that project (base/logger.d). Point no. 7, "Associative array invariance": This was my most frequent identifiable bug source. Pretty much what Benjamin said: it's annoying the program just crashes. However bugs like that are easy to find with a debugger... usually. Point no. 8, "No function overloading with template parameters": Got the same problem while templating some functions of an overload set. It's not possible to mix overloads with templates. That wasn't much of a problem but converting everything to templates doesn't work ether. In the end I used templates that generate normal function overloads and explicitly instantiated those templates. Happy programming Stephan Soller
Aug 29 2011
On Tuesday, August 30, 2011 03:44:33 Stephan Soller wrote:On 27.08.2011 19:16, Benjamin Thaut wrote:It's not called on _moves_. In a number of cases, the compiler moves a struct via a bitwise copy rather than actually copying it (which would involve calling the postblit constructor and the destructor). When that happens, the address of the struct changes. And since he was doing something where he was keeping track of the structs based on their addresses on the stack, it messed up his tracking. So, he can't really do what he's trying to do the way that he's trying to do it.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 welcomeAs for point no. 3 (Structs not having identity): Structs have a postblit constructor. These have access to the new struct but not the old one. Maybe you can use this to register a new reference. If I remember this right the old reference should be cleaned up (unregistered) by the destructor but I'm not sure. You article implies that the destructor is not called for every copy of the struct.Point no. 8, "No function overloading with template parameters": Got the same problem while templating some functions of an overload set. It's not possible to mix overloads with templates. That wasn't much of a problem but converting everything to templates doesn't work ether. In the end I used templates that generate normal function overloads and explicitly instantiated those templates.You can often add empty parens to templatize a function - e.g. int func()(int i) - to get around the problem without really changing your function. 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. - Jonathan M Davis
Aug 29 2011
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.
Aug 30 2011
On 8/30/11, Jonathan M Davis <jmdavisProg gmx.com> 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 a matter of time before it's implemented.
Aug 29 2011