Re: Blog post: What D got wrong

2018-12-20 Thread Neia Neutuladh via Digitalmars-d-announce
On Thu, 20 Dec 2018 14:19:33 +0100, Daniel Kozak wrote: > default(attributes..) is no needed. You can already do this by: > > pure @safe: > // your code That doesn't work if you have any member functions, and Walter says it's unlikely that that will ever change, even with a DIP. default(pure)

Re: Blog post: What D got wrong

2018-12-20 Thread Steven Schveighoffer via Digitalmars-d-announce
On 12/19/18 2:58 PM, Neia Neutuladh wrote: On Wed, 19 Dec 2018 17:28:01 +, Vijay Nayar wrote: Could you please elaborate a little bit more on this? In the linked program, I had expected that "ref" would return a reference to "a" that would behave similar to a pointer. They work like

Re: Blog post: What D got wrong

2018-12-20 Thread Atila Neves via Digitalmars-d-announce
On Wednesday, 19 December 2018 at 23:10:34 UTC, Rubn wrote: On Wednesday, 19 December 2018 at 19:58:53 UTC, Neia Neutuladh wrote: [...] To be fair even in c++ this won't be a reference. int& foo(); auto a = foo(); // a == int auto& a = foo(); // a == int& So it shouldn't be that surprising.

Re: Blog post: What D got wrong

2018-12-20 Thread Daniel Kozak via Digitalmars-d-announce
default(attributes..) is no needed. You can already do this by: pure @safe: // your code But what is needed is some way to disable those attributes. As you mentioned one way could be done by allowing this: pure(false) or pure!false or @disable(pure,@nogc...) >From implementation point of

Re: Blog post: What D got wrong

2018-12-19 Thread Dgame via Digitalmars-d-announce
On Thursday, 13 December 2018 at 18:29:39 UTC, Adam D. Ruppe wrote: The attribute spam is almost longer than the function itself. I often wished for something like module foo.bar; default(@safe, pure); function foo() { } // is annotated with @safe & pure @deny(pure) // or pure(false)

Re: Blog post: What D got wrong

2018-12-19 Thread Walter Bright via Digitalmars-d-announce
On 12/13/2018 10:29 AM, Adam D. Ruppe wrote: The attribute spam is almost longer than the function itself. Attributes only start to matter when creating code that will be around for a long time (such as reusable libraries). It's a waste of effort for short term code.

Re: Blog post: What D got wrong

2018-12-19 Thread Rubn via Digitalmars-d-announce
On Wednesday, 19 December 2018 at 19:58:53 UTC, Neia Neutuladh wrote: On Wed, 19 Dec 2018 17:28:01 +, Vijay Nayar wrote: Could you please elaborate a little bit more on this? In the linked program, I had expected that "ref" would return a reference to "a" that would behave similar to a

Re: Blog post: What D got wrong

2018-12-19 Thread Neia Neutuladh via Digitalmars-d-announce
On Wed, 19 Dec 2018 17:28:01 +, Vijay Nayar wrote: > Could you please elaborate a little bit more on this? In the linked > program, I had expected that "ref" would return a reference to "a" that > would behave similar to a pointer. They work like pointers that automatically dereference when

Re: Blog post: What D got wrong

2018-12-19 Thread Vijay Nayar via Digitalmars-d-announce
On Wednesday, 12 December 2018 at 07:44:12 UTC, Walter Bright wrote: On 12/11/2018 4:51 AM, Nicholas Wilson wrote: > Returning a reference Wow, thats f*ck'n stupid! https://run.dlang.io/is/SAplYw It's quite deliberate. ref in C++ is a type constructor, but it's so special-cased to behave

Re: Blog post: What D got wrong

2018-12-18 Thread Russel Winder via Digitalmars-d-announce
On Wed, 2018-12-19 at 01:45 +, Neia Neutuladh via Digitalmars-d-announce wrote: > On Wed, 19 Dec 2018 01:04:24 +, Nathan S. wrote: > > On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: > > > Not the case in Rust, not the case in how I write D. TBH it's not such > > > a big

Re: Blog post: What D got wrong

2018-12-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, December 18, 2018 1:17:28 AM MST Russel Winder via Digitalmars- d-announce wrote: > On Mon, 2018-12-17 at 12:16 -0800, Walter Bright via > Digitalmars-d-announce > wrote: > > […] > > > > Going pure, however, is much harder (at least for me) because I'm not > > used to > > programming

Re: Blog post: What D got wrong

2018-12-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, December 18, 2018 8:00:48 AM MST Steven Schveighoffer via Digitalmars-d-announce wrote: > On 12/17/18 4:42 AM, Dukc wrote: > > On Monday, 17 December 2018 at 09:41:01 UTC, Dukc wrote: > >> On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: > >>> @safe and pure though...

Re: Blog post: What D got wrong

2018-12-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, December 18, 2018 7:02:43 PM MST H. S. Teoh via Digitalmars-d- announce wrote: > On Tue, Dec 18, 2018 at 06:53:02PM -0700, Jonathan M Davis via > Digitalmars-d-announce wrote: [...] > > > I confess that I do tend to think about things from the standpoint of > > a library designer

Re: Blog post: What D got wrong

2018-12-18 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 18, 2018 at 06:53:02PM -0700, Jonathan M Davis via Digitalmars-d-announce wrote: [...] > I confess that I do tend to think about things from the standpoint of > a library designer though, in part because I work on stuff like > Phobos, but also because I tend to break up my programs

Re: Blog post: What D got wrong

2018-12-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, December 18, 2018 6:35:34 AM MST Pjotr Prins via Digitalmars-d- announce wrote: > On Tuesday, 18 December 2018 at 11:25:17 UTC, Jonathan M Davis > > wrote: > > Of course, even if we _did_ have a solution for reversing > > attributes, slapping an attribute on the top of the module > >

Re: Blog post: What D got wrong

2018-12-18 Thread Neia Neutuladh via Digitalmars-d-announce
On Wed, 19 Dec 2018 01:04:24 +, Nathan S. wrote: > On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: >> Not the case in Rust, not the case in how I write D. TBH it's not such >> a big deal because something has to be typed, I just default to const >> now anyway instead of auto.

Re: Blog post: What D got wrong

2018-12-18 Thread Nathan S. via Digitalmars-d-announce
On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: Not the case in Rust, not the case in how I write D. TBH it's not such a big deal because something has to be typed, I just default to const now anyway instead of auto. @safe and pure though... I'd be interested in seeing some

Re: Blog post: What D got wrong

2018-12-18 Thread Mike Wey via Digitalmars-d-announce
On 18-12-2018 19:52, Russel Winder wrote: On Tue, 2018-12-18 at 16:50 +, Neia Neutuladh via Digitalmars-d-announce wrote: Is there a video link for that talk? I'd be interested in hearing it. The videos are here: https://gstconf.ubicast.tv/channels/#gstreamer-conference-2018 I think

Re: Blog post: What D got wrong

2018-12-18 Thread Russel Winder via Digitalmars-d-announce
On Tue, 2018-12-18 at 16:50 +, Neia Neutuladh via Digitalmars-d-announce wrote: > On Tue, 18 Dec 2018 08:17:28 +, Russel Winder wrote: > > I did a lightning talk at the GStreamer conference in Edinburgh a couple > > of months ago, concluding that I think D (which about half the audience >

Re: Blog post: What D got wrong

2018-12-18 Thread Neia Neutuladh via Digitalmars-d-announce
On Tue, 18 Dec 2018 08:17:28 +, Russel Winder wrote: > I did a lightning talk at the GStreamer conference in Edinburgh a couple > of months ago, concluding that I think D (which about half the audience > knew of) is overall better than Rust for GTK+ and GStreamer > applications, but

Re: Blog post: What D got wrong

2018-12-18 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 18, 2018 at 08:17:28AM +, Russel Winder via Digitalmars-d-announce wrote: > On Mon, 2018-12-17 at 12:16 -0800, Walter Bright via Digitalmars-d-announce > wrote: > > […] > > > > Going pure, however, is much harder (at least for me) because I'm > > not used to programming that way.

Re: Blog post: What D got wrong

2018-12-18 Thread Kagamin via Digitalmars-d-announce
On Monday, 17 December 2018 at 11:04:13 UTC, Atila Neves wrote: Why @safe? Can't you just write "@safe:" on top and switch to @system/@trusted as needed? Not quite. It doesn't work the way most people expect for member functions and causes problems for templates. Don't templates infer

Re: Blog post: What D got wrong

2018-12-18 Thread Steven Schveighoffer via Digitalmars-d-announce
On 12/17/18 4:42 AM, Dukc wrote: On Monday, 17 December 2018 at 09:41:01 UTC, Dukc wrote: On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: @safe and pure though... Why @safe? Can't you just write "@safe:" on top and switch to @system/@trusted as needed? Argh, I forgot

Re: Blog post: What D got wrong

2018-12-18 Thread Russel Winder via Digitalmars-d-announce
On Tue, 2018-12-18 at 12:20 +, Kagamin via Digitalmars-d-announce wrote: > On Tuesday, 18 December 2018 at 10:19:14 UTC, Russel Winder wrote: > > Clojure is but you have to work hard for that, the initial > > language is effectively pure. > > https://ideone.com/y8KWja clearly it isn't, its

Re: Blog post: What D got wrong

2018-12-18 Thread Pjotr Prins via Digitalmars-d-announce
On Tuesday, 18 December 2018 at 11:25:17 UTC, Jonathan M Davis wrote: Of course, even if we _did_ have a solution for reversing attributes, slapping an attribute on the top of the module would still potentially be a maintenance problem, because it's then really easy to miss that an attribute

Re: Blog post: What D got wrong

2018-12-18 Thread bachmeier via Digitalmars-d-announce
On Tuesday, 18 December 2018 at 12:20:48 UTC, Kagamin wrote: On Tuesday, 18 December 2018 at 10:19:14 UTC, Russel Winder wrote: Clojure is but you have to work hard for that, the initial language is effectively pure. https://ideone.com/y8KWja clearly it isn't, its site only claims that most

Re: Blog post: What D got wrong

2018-12-18 Thread Kagamin via Digitalmars-d-announce
On Tuesday, 18 December 2018 at 10:19:14 UTC, Russel Winder wrote: Clojure is but you have to work hard for that, the initial language is effectively pure. https://ideone.com/y8KWja clearly it isn't, its site only claims that most code happens to be pure, but it looks like it's not checked

Re: Blog post: What D got wrong

2018-12-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, December 18, 2018 3:36:15 AM MST Pjotr Prins via Digitalmars-d- announce wrote: > On Thursday, 13 December 2018 at 18:29:39 UTC, Adam D. Ruppe > > wrote: > > On Thursday, 13 December 2018 at 10:29:10 UTC, RazvanN wrote: > >> Do you honestly think that they will ever take D into account

Re: Blog post: What D got wrong

2018-12-18 Thread Pjotr Prins via Digitalmars-d-announce
On Thursday, 13 December 2018 at 18:29:39 UTC, Adam D. Ruppe wrote: On Thursday, 13 December 2018 at 10:29:10 UTC, RazvanN wrote: Do you honestly think that they will ever take D into account if @safe and immutable data will be the default? D needs to stop chasing after what you think people

Re: Blog post: What D got wrong

2018-12-18 Thread Russel Winder via Digitalmars-d-announce
On Tue, 2018-12-18 at 09:59 +, Kagamin via Digitalmars-d-announce wrote: > […] > AIU rust, clojure and prolog are impure. Clearly Rust is because it allows for mutability, though it is not the default. Clojure is but you have to work hard for that, the initial language is effectively pure.

Re: Blog post: What D got wrong

2018-12-18 Thread Kagamin via Digitalmars-d-announce
On Tuesday, 18 December 2018 at 08:17:28 UTC, Russel Winder wrote: Rust I feel has a pivotal role in all this. By emphasising the ML view on mixed declarative and imperative programming, it has found an interesting middle ground that seems to work very well. Many of the C programmers who

Re: Blog post: What D got wrong

2018-12-18 Thread Russel Winder via Digitalmars-d-announce
On Mon, 2018-12-17 at 12:16 -0800, Walter Bright via Digitalmars-d-announce wrote: > […] > > Going pure, however, is much harder (at least for me) because I'm not used > to > programming that way. Making a function pure often requires reorganization > of > how a task is broken up into data

Re: Blog post: What D got wrong

2018-12-17 Thread Walter Bright via Digitalmars-d-announce
On 12/15/2018 11:53 AM, Atila Neves wrote: @safe and pure though... @safe is not so hard to adopt, since by using @trusted one can proceed incrementally. Going pure, however, is much harder (at least for me) because I'm not used to programming that way. Making a function pure often

Re: Blog post: What D got wrong

2018-12-17 Thread Atila Neves via Digitalmars-d-announce
On Monday, 17 December 2018 at 09:41:01 UTC, Dukc wrote: On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: @safe and pure though... Why @safe? Can't you just write "@safe:" on top and switch to @system/@trusted as needed? Not quite. It doesn't work the way most people

Re: Blog post: What D got wrong

2018-12-17 Thread Dukc via Digitalmars-d-announce
On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: @safe and pure though... Why @safe? Can't you just write "@safe:" on top and switch to @system/@trusted as needed?

Re: Blog post: What D got wrong

2018-12-17 Thread Dukc via Digitalmars-d-announce
On Monday, 17 December 2018 at 09:41:01 UTC, Dukc wrote: On Saturday, 15 December 2018 at 19:53:06 UTC, Atila Neves wrote: @safe and pure though... Why @safe? Can't you just write "@safe:" on top and switch to @system/@trusted as needed? Argh, I forgot that you are not supposed to @safe

Re: Blog post: What D got wrong

2018-12-17 Thread Russel Winder via Digitalmars-d-announce
On Sat, 2018-12-15 at 19:53 +, Atila Neves via Digitalmars-d-announce wrote: > On Saturday, 15 December 2018 at 02:16:36 UTC, Nathan S. wrote: > > On Thursday, 13 December 2018 at 10:14:45 UTC, Atila Neves > > wrote: > > > My impression is that it's a consensus that it _should_, but > > >

Re: Blog post: What D got wrong

2018-12-15 Thread Atila Neves via Digitalmars-d-announce
On Saturday, 15 December 2018 at 02:16:36 UTC, Nathan S. wrote: On Thursday, 13 December 2018 at 10:14:45 UTC, Atila Neves wrote: My impression is that it's a consensus that it _should_, but it's not going to happen due to breaking existing code. I think it would be a bad idea for `immutable`

Re: Blog post: What D got wrong

2018-12-14 Thread evilrat via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Wait, no word about ref parameters? No way! If you try to bind to typical C++ code they are

Re: Blog post: What D got wrong

2018-12-14 Thread Nathan S. via Digitalmars-d-announce
On Thursday, 13 December 2018 at 10:14:45 UTC, Atila Neves wrote: My impression is that it's a consensus that it _should_, but it's not going to happen due to breaking existing code. I think it would be a bad idea for `immutable` because more often than not it would need to be turned off.

Re: Blog post: What D got wrong

2018-12-13 Thread Paolo Invernizzi via Digitalmars-d-announce
On Thursday, 13 December 2018 at 18:29:39 UTC, Adam D. Ruppe wrote: 2) LETTING US TURN THEM OFF. SERIOUSLY WHY DON'T WE HAVE `virtual`, `throws`, `impure` AND THE REST?! THIS IS SO OBVIOUS AND THE LACK OF THEM IS UNBELIEVABLY FRUSTRATING. Well, we had virtual, it was reverted I know,

Re: Blog post: What D got wrong

2018-12-13 Thread Neia Neutuladh via Digitalmars-d-announce
On Thursday, 13 December 2018 at 18:29:39 UTC, Adam D. Ruppe wrote: Though, I think we could also get a lot of mileage out of fixing two glaring problems with the status quo: 1) making attr: at the top descend into aggregates consistently and 2) LETTING US TURN THEM OFF. SERIOUSLY WHY DON'T WE

Re: Blog post: What D got wrong

2018-12-13 Thread Neia Neutuladh via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: I think there’s a general consensus that @safe, pure and immutable should be default. I recall there was a decent chunk of people around D2.007 who were pushing for const-by-default function parameters on the grounds of if

Re: Blog post: What D got wrong

2018-12-13 Thread dayllenger via Digitalmars-d-announce
On Thursday, 13 December 2018 at 18:29:39 UTC, Adam D. Ruppe wrote: I wanna show you something: /// Static convenience functions for common color names nothrow pure @nogc @safe static Color transparent() { return Color(0, 0, 0, 0); } Enums could resolve this particular case. My thought on

Re: Blog post: What D got wrong

2018-12-13 Thread Adam D. Ruppe via Digitalmars-d-announce
On Thursday, 13 December 2018 at 10:29:10 UTC, RazvanN wrote: Do you honestly think that they will ever take D into account if @safe and immutable data will be the default? D needs to stop chasing after what you think people think they want and just start being good for us. The majority of

Re: Blog post: What D got wrong

2018-12-13 Thread jmh530 via Digitalmars-d-announce
On Thursday, 13 December 2018 at 17:07:58 UTC, H. S. Teoh wrote: [snip] Why not? You can opt out. It's not as though you're forced to use immutable everything and nothing but, like in a pure functional language. Just tack on @system or mutable when you need to. Mutable might be a

Re: Blog post: What D got wrong

2018-12-13 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Dec 13, 2018 at 10:29:10AM +, RazvanN via Digitalmars-d-announce wrote: [...] > D and Rust are competing to get the C/C++/Java/Python market share. In > order to do that they should make it simple for developers to convert > to the new language. Due to its design, Rust is insanely

Re: Blog post: What D got wrong

2018-12-13 Thread RazvanN via Digitalmars-d-announce
On Thursday, 13 December 2018 at 10:14:45 UTC, Atila Neves wrote: On Thursday, 13 December 2018 at 09:40:45 UTC, RazvanN wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately:

Re: Blog post: What D got wrong

2018-12-13 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 13 December 2018 at 09:40:45 UTC, RazvanN wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ That was a really good blog post,

Re: Blog post: What D got wrong

2018-12-13 Thread Guillaume Piolat via Digitalmars-d-announce
On Thursday, 13 December 2018 at 09:40:45 UTC, RazvanN wrote: "I think there’s a general consensus that @safe, pure and immutable should be default." It's not at all a general consensus and doing this would literally break all the existing D code. Without discussing all the technical

Re: Blog post: What D got wrong

2018-12-13 Thread RazvanN via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ That was a really good blog post, however I am strongly against the following sentence: "I think

Re: Blog post: What D got wrong

2018-12-12 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, December 12, 2018 3:49:51 PM MST H. S. Teoh via Digitalmars-d- announce wrote: > If the delegate property thing is the only real use case for @property, > it seems quite out-of-proportion that an entire @-identifier in the > language is dedicated just for this purpose. One would've

Re: Blog post: What D got wrong

2018-12-12 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Dec 12, 2018 at 02:10:31PM -0700, Jonathan M Davis via Digitalmars-d-announce wrote: > On Wednesday, December 12, 2018 6:03:39 AM MST Kagamin via Digitalmars-d- > announce wrote: [...] > > Imagine you have void delegate() prop() and use the property > > without parentheses everywhere then

Re: Blog post: What D got wrong

2018-12-12 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, December 12, 2018 6:03:39 AM MST Kagamin via Digitalmars-d- announce wrote: > On Tuesday, 11 December 2018 at 12:57:03 UTC, Atila Neves wrote: > > @property is useful for setters. Now, IMHO setters are a code > > stink anyway but sometimes they're the way to go. I have no > > idea

Re: Blog post: What D got wrong

2018-12-12 Thread JN via Digitalmars-d-announce
On Wednesday, 12 December 2018 at 20:12:54 UTC, Guillaume Piolat wrote: On Wednesday, 12 December 2018 at 14:48:23 UTC, Atila Neves wrote: On Tuesday, 11 December 2018 at 14:00:10 UTC, dayllenger wrote: On Tuesday, 11 December 2018 at 13:42:03 UTC, Guillaume Piolat wrote: One could say getters

Re: Blog post: What D got wrong

2018-12-12 Thread Guillaume Piolat via Digitalmars-d-announce
On Wednesday, 12 December 2018 at 14:48:23 UTC, Atila Neves wrote: On Tuesday, 11 December 2018 at 14:00:10 UTC, dayllenger wrote: On Tuesday, 11 December 2018 at 13:42:03 UTC, Guillaume Piolat wrote: One could say getters and particularly setters don't really deserve a nicer way to write

Re: Blog post: What D got wrong

2018-12-12 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 14:00:10 UTC, dayllenger wrote: On Tuesday, 11 December 2018 at 13:42:03 UTC, Guillaume Piolat wrote: One could say getters and particularly setters don't really deserve a nicer way to write them. It's a code stink, it deserve a long ugly name. (10 years ago I

Re: Blog post: What D got wrong

2018-12-12 Thread Kagamin via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 12:57:03 UTC, Atila Neves wrote: @property is useful for setters. Now, IMHO setters are a code stink anyway but sometimes they're the way to go. I have no idea what it's supposed to do for getters (nor am I interested in learning or retaining that information)

Re: Blog post: What D got wrong

2018-12-11 Thread Walter Bright via Digitalmars-d-announce
On 12/11/2018 4:51 AM, Nicholas Wilson wrote: > Returning a reference Wow, thats f*ck'n stupid! https://run.dlang.io/is/SAplYw It's quite deliberate. ref in C++ is a type constructor, but it's so special-cased to behave like a storage class, it might as well be one. In D it is. (For

Re: Blog post: What D got wrong

2018-12-11 Thread Petar via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ No UFCS chain for templates. No template lambdas. You can write code like this today via library

Re: Blog post: What D got wrong

2018-12-11 Thread Mike Franklin via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 14:38:25 UTC, Steven Schveighoffer wrote: @property: This was almost about to be awesome, but squabbling amongst the D core team killed it. Yes, the problem with @property is that it is neither correctly implemented nor completely implemented. And to do the

Re: Blog post: What D got wrong

2018-12-11 Thread Meta via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 20:44:28 UTC, Dukc wrote: On Tuesday, 11 December 2018 at 15:34:28 UTC, Simen Kjærås wrote: I believe a reasonable case can be made for .! for UFCS - it's currently invalid syntax and will not compile, and ! is the symbol we already associate with template

Re: Blog post: What D got wrong

2018-12-11 Thread Meta via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Template lambdas and better eponymous template syntax are the two big ones that I would really like.

Re: Blog post: What D got wrong

2018-12-11 Thread Dukc via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 15:34:28 UTC, Simen Kjærås wrote: I believe a reasonable case can be made for .! for UFCS - it's currently invalid syntax and will not compile, and ! is the symbol we already associate with template instantiation: alias memberFunctions = __traits(allMembers,

Re: Blog post: What D got wrong

2018-12-11 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 11, 2018 at 03:34:28PM +, Simen Kjærås via Digitalmars-d-announce wrote: [...] > I believe a reasonable case can be made for .! for UFCS - it's > currently invalid syntax and will not compile, and ! is the symbol we > already associate with template instantiation: > > alias

Re: Blog post: What D got wrong

2018-12-11 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 11, 2018 at 03:03:19PM +0100, Daniel Kozak via Digitalmars-d-announce wrote: >On Tue, Dec 11, 2018 at 11:50 AM Atila Neves via Digitalmars-d-announce ><[1]digitalmars-d-announce@puremagic.com> wrote: > > A few things that have annoyed me about writing D lately: > >

Re: Blog post: What D got wrong

2018-12-11 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 11, 2018 at 12:57:03PM +, Atila Neves via Digitalmars-d-announce wrote: > On Tuesday, 11 December 2018 at 12:52:20 UTC, Adam D. Ruppe wrote: > > On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: > > > A few things that have annoyed me about writing D lately: > > >

Re: Blog post: What D got wrong

2018-12-11 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 11, 2018 at 10:45:39AM +, Atila Neves via Digitalmars-d-announce wrote: > A few things that have annoyed me about writing D lately: > > https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ About UFCS chains for templates: totally agree! I found myself wishing for

Re: Blog post: What D got wrong

2018-12-11 Thread Mike Wey via Digitalmars-d-announce
On 11-12-2018 12:10, Atila Neves wrote: On Tuesday, 11 December 2018 at 11:08:29 UTC, user1234 wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/

Re: Blog post: What D got wrong

2018-12-11 Thread Simen Kjærås via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 14:38:25 UTC, Steven Schveighoffer wrote: On 12/11/18 5:45 AM, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Agree with most of this. UFCS for templates would be

Re: Blog post: What D got wrong

2018-12-11 Thread Steven Schveighoffer via Digitalmars-d-announce
On 12/11/18 5:45 AM, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Agree with most of this. UFCS for templates would be awesome, but the syntax is trickier, since instantiation uses ! instead

Re: Blog post: What D got wrong

2018-12-11 Thread Daniel Kozak via Digitalmars-d-announce
On Tue, Dec 11, 2018 at 11:50 AM Atila Neves via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > A few things that have annoyed me about writing D lately: > > https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Eponymous templates - workaround

Re: Blog post: What D got wrong

2018-12-11 Thread 12345swordy via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 12:57:03 UTC, Atila Neves wrote: On Tuesday, 11 December 2018 at 12:52:20 UTC, Adam D. Ruppe wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately:

Re: Blog post: What D got wrong

2018-12-11 Thread dayllenger via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 13:42:03 UTC, Guillaume Piolat wrote: One could say getters and particularly setters don't really deserve a nicer way to write them. It's a code stink, it deserve a long ugly name. (10 years ago I would be in the other camp) Can you please explain it in more

Re: Blog post: What D got wrong

2018-12-11 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ One thing that could be improved in this post is separating things that can't reasonably be either

Re: Blog post: What D got wrong

2018-12-11 Thread Guillaume Piolat via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 13:08:18 UTC, 0xEAB wrote: Well, one can use it for optics :) @property { int x() { return this._x; } void x(int value) { this._x = value; } } One could say getters and particularly setters don't really deserve a

Re: Blog post: What D got wrong

2018-12-11 Thread 0xEAB via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 12:57:03 UTC, Atila Neves wrote: On Tuesday, 11 December 2018 at 12:52:20 UTC, Adam D. Ruppe wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately:

Re: Blog post: What D got wrong

2018-12-11 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 12:51:56 UTC, Nicholas Wilson wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Nice! Thanks! I like the

Re: Blog post: What D got wrong

2018-12-11 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 12:52:20 UTC, Adam D. Ruppe wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ If @property worked for a thing to

Re: Blog post: What D got wrong

2018-12-11 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ If @property worked for a thing to return a delegate, it would be useful. But n, we got worked

Re: Blog post: What D got wrong

2018-12-11 Thread Nicholas Wilson via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Nice! I like the eponymous templates idea, though it might get confusing with doubly nested

Re: Blog post: What D got wrong

2018-12-11 Thread Guillaume Piolat via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ Really great article. I like the "UFCS for templates" idea. 12 years in and I still don't know what

Re: Blog post: What D got wrong

2018-12-11 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 11:08:29 UTC, user1234 wrote: On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ I agree about template lambdas. But is

Re: Blog post: What D got wrong

2018-12-11 Thread user1234 via Digitalmars-d-announce
On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote: A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/ I agree about template lambdas. But is something that misses really an error ?

Blog post: What D got wrong

2018-12-11 Thread Atila Neves via Digitalmars-d-announce
A few things that have annoyed me about writing D lately: https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/