Re: A new blog article detailing the alternative function syntax
On Thursday, 8 August 2013 at 22:37:04 UTC, Andrei Alexandrescu wrote: If you want me to post to reddit tomorrow morning, let me know. My good post karma is likely to push the post into visibility quickly. On the other hand, if you post it yourself it will improve _your_ karma. Tradeoffs, tradeoffs... Sure go ahead.
Re: A new blog article detailing the alternative function syntax
On Friday, 9 August 2013 at 08:03:45 UTC, Gary Willoughby wrote: On Thursday, 8 August 2013 at 22:37:04 UTC, Andrei Alexandrescu wrote: If you want me to post to reddit tomorrow morning, let me know. My good post karma is likely to push the post into visibility quickly. On the other hand, if you post it yourself it will improve _your_ karma. Tradeoffs, tradeoffs... Sure go ahead. Good read. I think I already knew all of it, but seeing it all written in a concise and organized way is always a good refresher, and also reminds you of the why things are the way they are.
Re: A new blog article detailing the alternative function syntax
Quick question: does UFCS allow you to make a type implement an interface?
Re: A new blog article detailing the alternative function syntax
On Thursday, 8 August 2013 at 19:24:31 UTC, Ary Borenszweig wrote: On 8/8/13 3:53 PM, Gary Willoughby wrote: I've just finished a new blog article on the subject of alternative function syntax in D. I guess this is pretty straightforward stuff to all the people here but was a major source of confusion to me (and others?) when first learning D. I personally think this is more confusing than many people think. Hopefully this will quickly arm a developer with knowledge to be able to read and understand most D code. Let me know if i've missed anything important. http://nomad.so/2013/08/alternative-function-syntax-in-d/ I'll post to reddit in the morning. Nice article. But when I read alternative function syntax I thought your article was a proposal for that, an alternative function syntax. :-P Maybe it should be renamed to something else... but I don't know enough English to suggest that. I agree, the article title should be something like Uniform Function Call Syntax. Exactly like in in this article: http://www.drdobbs.com/cpp/uniform-function-call-syntax/232700394 .
Re: Article: D Exceptions and C Callbacks
On Tuesday, 6 August 2013 at 15:05:22 UTC, Mike Parker wrote: Shows how I like to deal with throwing exceptions from C callbacks in D. Target audience is beginner-level. Uses GLFW to demonstrate. http://www.gamedev.net/page/resources/_/technical/general-programming/d-exceptions-and-c-callbacks-r3323 Nice article. A few minor corrections: - In your second code sample, the D translation of the C code, the line glfwSetWindowCloseCallback( onWindowClose ); should read either glfwSetWindowCloseCallback( win, onWindowClose ); or win.glfwSetWindowCloseCallback( onWindowClose ); Maybe point out both are possible, but perhaps this is out of the scope of the article. - When explaining the difference between D Throwable, Exception, and Error, you write: The latter is analagous to Java's RuntimeException in that it is not intended to be caught. It should be thrown to indicate an unrecoverable error in the program. Java uses Error for unrecoverable errors too. RuntimeExceptions are recoverable and meant to be catched. It would be more accurate to say D lacks Java's checked exceptions, D exceptions are like Java's RuntimeExceptions, and D Errors are like Java Errors.
Re: Article: D Exceptions and C Callbacks
On Friday, 9 August 2013 at 14:08:48 UTC, Rene Zwanenburg wrote: - In your second code sample, the D translation of the C code, the line glfwSetWindowCloseCallback( onWindowClose ); should read either glfwSetWindowCloseCallback( win, onWindowClose ); or win.glfwSetWindowCloseCallback( onWindowClose ); Thanks! That was an oversight. I've corrected it. - When explaining the difference between D Throwable, Exception, and Error, you write: The latter is analagous to Java's RuntimeException in that it is not intended to be caught. It should be thrown to indicate an unrecoverable error in the program. Java uses Error for unrecoverable errors too. RuntimeExceptions are recoverable and meant to be catched. It would be more accurate to say D lacks Java's checked exceptions, D exceptions are like Java's RuntimeExceptions, and D Errors are like Java Errors. I just removed the reference to Java entirely. Thanks for pointing that out. I've had it in my head for years that RuntimeException was for unrecoverable errors.
Re: A new blog article detailing the alternative function syntax
On 8/9/13 1:03 AM, Gary Willoughby wrote: On Thursday, 8 August 2013 at 22:37:04 UTC, Andrei Alexandrescu wrote: If you want me to post to reddit tomorrow morning, let me know. My good post karma is likely to push the post into visibility quickly. On the other hand, if you post it yourself it will improve _your_ karma. Tradeoffs, tradeoffs... Sure go ahead. Much obliged: http://www.reddit.com/r/programming/comments/1k18ls/alternative_function_syntax_in_d_explained/ Andrei
Re: Component programming with ranges
On Tue, 6 Aug 2013 12:56:48 -0700 Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Vote up! http://www.reddit.com/r/programming/comments/1jtzez/component_programming_with_ranges/ Great article. Even as an experienced D user, it really gave me a lot to think about.