Re: DIP64: Attribute Cleanup

2016-04-18 Thread Jonathan M Davis via Digitalmars-d
On Monday, April 18, 2016 20:49:45 jmh530 via Digitalmars-d wrote: > As an aside, the reason for not having function attribute > inference everywhere is that it doesn't work when function bodies > are not available. How common is this? I feel like I never write > functions like this. Why not just

Re: DIP64: Attribute Cleanup

2016-04-18 Thread Marco Leise via Digitalmars-d
Am Mon, 18 Apr 2016 20:49:45 + schrieb jmh530 : > As an aside, the reason for not having function attribute > inference everywhere is that it doesn't work when function bodies > are not available. How common is this? I feel like I never write > functions like

Re: DIP64: Attribute Cleanup

2016-04-18 Thread jmh530 via Digitalmars-d
On Monday, 18 April 2016 at 19:57:42 UTC, cym13 wrote: @default = @safe @nogc @pure int foo(int i) { ... } // This function is @safe @nogc @pure int bar(int i) @pure { ... } // This function is only @pure Why not just put @safe @nogc pure: at the top? I feel like @default would

Re: DIP64: Attribute Cleanup

2016-04-18 Thread Basile B. via Digitalmars-d
On Monday, 18 April 2016 at 19:57:42 UTC, cym13 wrote: On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones

Re: DIP64: Attribute Cleanup

2016-04-18 Thread cym13 via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues.

Re: DIP64: Attribute Cleanup

2016-04-18 Thread Jonathan M Davis via Digitalmars-d
On Monday, April 18, 2016 13:10:59 jmh530 via Digitalmars-d wrote: > On Monday, 18 April 2016 at 12:11:46 UTC, Jonathan M Davis wrote: > > Regardless, changing any of the attributes now would break a > > _lot_ of code, and such a change would have to be worth the > > pain that it would cause,

Re: DIP64: Attribute Cleanup

2016-04-18 Thread jmh530 via Digitalmars-d
On Monday, 18 April 2016 at 12:11:46 UTC, Jonathan M Davis wrote: Regardless, changing any of the attributes now would break a _lot_ of code, and such a change would have to be worth the pain that it would cause, which is questinonable. dfix has a DIP64 switch, right?

Re: DIP64: Attribute Cleanup

2016-04-18 Thread Jonathan M Davis via Digitalmars-d
On Monday, April 18, 2016 10:32:39 Satoshi via Digitalmars-d wrote: > On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: > > http://wiki.dlang.org/DIP64 > > > > Attributes in D have two problems: > > 1. There are too many of them and declarations are getting too > > verbose > > 2. New

Re: DIP64: Attribute Cleanup

2016-04-18 Thread Basile B. via Digitalmars-d
On Monday, 18 April 2016 at 10:32:39 UTC, Satoshi wrote: On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones

Re: DIP64: Attribute Cleanup

2016-04-18 Thread Satoshi via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues.

Re: DIP64: Attribute Cleanup

2016-04-17 Thread Nordlöw via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues.

Re: DIP64: Attribute Cleanup

2016-04-17 Thread Nick Treleaven via Digitalmars-d
On Sunday, 17 April 2016 at 12:05:03 UTC, Anonymous5 wrote: If attributes are well split into sub categories, we could justify that a sub category will have @ and another not (e.g protection attributes: not @, functions attributes: @). The list of attributes that's not classified is: +

Re: DIP64: Attribute Cleanup

2016-04-17 Thread Anonymous5 via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues.

Re: DIP64: Attribute Cleanup

2014-06-22 Thread Jonathan M Davis via Digitalmars-d
On Sun, 22 Jun 2014 05:49:33 + Mason McGill via Digitalmars-d digitalmars-d@puremagic.com wrote: I was referring to the `Property` and `PropertyIdentifier` entities in the D grammar (http://dlang.org/attribute.html), which are special cases of attributes. New-style attributes, like

Re: DIP64: Attribute Cleanup

2014-06-22 Thread Jonathan M Davis via Digitalmars-d
On Fri, 20 Jun 2014 19:22:02 + Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've

Re: DIP64: Attribute Cleanup

2014-06-22 Thread Jonathan M Davis via Digitalmars-d
On Sat, 21 Jun 2014 22:07:22 -0700 Jonathan M Davis via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sat, 21 Jun 2014 20:48:40 + Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: Why is D being consistent with other languages a more important goal than D being

Re: DIP64: Attribute Cleanup

2014-06-22 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 22 June 2014 at 06:37:22 UTC, Jonathan M Davis via Digitalmars-d wrote: On Sat, 21 Jun 2014 22:07:22 -0700 I'd much rather just put up with having to explain to people that we didn't want to add new keywords and that that's why @safe, @trusted, @system, @property, and @nogc have @

Re: DIP64: Attribute Cleanup

2014-06-22 Thread Artur Skawina via Digitalmars-d
On 06/22/14 08:26, Jonathan M Davis via Digitalmars-d wrote: I would point out that if we do this, we should serious consider renaming pure to @noglobal rather than @pure, or even making it the default and then adding @global. That would make it so that we wouldn't have to keep explaining about

Re: DIP64: Attribute Cleanup

2014-06-22 Thread Shammah Chancellor via Digitalmars-d
On 2014-06-21 19:33:44 +, Artur Skawina via Digitalmars-d said: On 06/21/14 19:56, Shammah Chancellor via Digitalmars-d wrote: I like it, but I think the attribute sets should be based on then alias syntax though. alias @attributeSet = (@attribute1, @attribute2, @attribute3); Well, D

Re: DIP64: Attribute Cleanup

2014-06-22 Thread Artur Skawina via Digitalmars-d
On 06/22/14 14:18, Shammah Chancellor via Digitalmars-d wrote: So, basically we don't need special syntax for attribute sets, we just need to make it so built-in attributes are not special? I think this is one option. But exposing them as symbols w/o breaking too much existing code will not

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Kapps via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues. I

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Peter Alexander via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 All things being equal, it would be nicer to have consistency, but do we really I want to break almost all existing code? I know you've proposed a tool to do the transition, but there are lots of

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Brian Rogoff via Digitalmars-d
On Saturday, 21 June 2014 at 17:11:24 UTC, Peter Alexander wrote: On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 All things being equal, it would be nicer to have consistency, but do we really I want to break almost all existing code? I know you've

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Peter Alexander via Digitalmars-d
On Saturday, 21 June 2014 at 17:20:08 UTC, Brian Rogoff wrote: I completely agree with your point, but if things never get cleaned up we'll need a guy like Scott Meyers to explain the overcomplicated result. I don't know how to resolve this issue, opponents of change will claim that a language

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Shammah Chancellor via Digitalmars-d
On 2014-06-20 19:22:02 +, Brian Schott said: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues. I like it, but

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Temtaime via Digitalmars-d
Too many attributes in D. In C++ there is no pure, safe, trusted and others. And it's C++ that shows that almost all of D attributes are not necessary. Welcome to attribute hell !

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Jonathan M Davis via Digitalmars-d
On Fri, 20 Jun 2014 19:22:02 + Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Chris Cain via Digitalmars-d
On Saturday, 21 June 2014 at 18:11:32 UTC, Chris Cain wrote: On Saturday, 21 June 2014 at 18:07:25 UTC, Temtaime wrote: Too many attributes in D. In C++ there is no pure, safe, trusted and others. And it's C++ that shows that almost all of D attributes are not necessary. Welcome to

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Chris Cain via Digitalmars-d
On Saturday, 21 June 2014 at 18:07:25 UTC, Temtaime wrote: Too many attributes in D. In C++ there is no pure, safe, trusted and others. And it's C++ that shows that almost all of D attributes are not necessary. Welcome to attribute hell ! Of course. But pure/safe/trusted/others statically

Re: DIP64: Attribute Cleanup

2014-06-21 Thread francesco cattoglio via Digitalmars-d
On Saturday, 21 June 2014 at 18:07:25 UTC, Temtaime wrote: And it's C++ that shows that almost all of D attributes are not necessary. How so? Anyway, I totally agree that attributes NEED cleanup, it really makes zero sense to have some without @ annotation. Really, keep Scott's talk in

Re: DIP64: Attribute Cleanup

2014-06-21 Thread bearophile via Digitalmars-d
Temtaime: Too many attributes in D. In C++ there is no pure, safe, trusted and others. And it's C++ that shows that almost all of D attributes are not necessary. And C shows that most C++ features are not necessary. You can implement OOP manually, etc. Bye, bearophile

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Temtaime via Digitalmars-d
We can try to emulate it, yes. But it results in bug-prone and 'll ugly. C++ gives more comfortable ways to implement things. And attributes - it's only restrictions and gives almost nothing. If you don't want to play with pointers - just don't do it instead of writing @safe etc.

Re: DIP64: Attribute Cleanup

2014-06-21 Thread bearophile via Digitalmars-d
Temtaime: If you don't want to play with pointers - just don't do it instead of writing @safe etc. This is the C approach to programming, that has worked well enough for many years. Give the programmers all the sharp tools and let them sort out their usage and to follow sufficient safety

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Chris Cain via Digitalmars-d
On Saturday, 21 June 2014 at 18:20:43 UTC, Temtaime wrote: And attributes - it's only restrictions and gives almost nothing. I'll reiterate that the restrictions in question make code easier to reason about. Increased reasoning is not almost nothing ... in fact, that's one of the main

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Temtaime via Digitalmars-d
I think you misunderstood me. I didn't say that C++ is useless and C can do all the things. I spoken only about attributes. D gives much more static checks and other great things. And i'm unsure only at necessity of all these attributes. In all my code i really uses only const , immutable

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Artur Skawina via Digitalmars-d
On 06/21/14 19:56, Shammah Chancellor via Digitalmars-d wrote: I like it, but I think the attribute sets should be based on then alias syntax though. alias @attributeSet = (@attribute1, @attribute2, @attribute3); Well, D does not have that kind of tuple syntax and introducing one for this

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Jonathan M Davis via Digitalmars-d
On Sat, 21 Jun 2014 17:54:33 + Peter Alexander via Digitalmars-d digitalmars-d@puremagic.com wrote: On Saturday, 21 June 2014 at 17:20:08 UTC, Brian Rogoff wrote: I completely agree with your point, but if things never get cleaned up we'll need a guy like Scott Meyers to explain the

Re: DIP64: Attribute Cleanup

2014-06-21 Thread H. S. Teoh via Digitalmars-d
On Sat, Jun 21, 2014 at 12:41:26PM -0700, Jonathan M Davis via Digitalmars-d wrote: [...] And to add to that, this proposal doesn't even make things consistent. You _still_ have to explain why some attributes have @ and some don't. It's just that now two of them have @ whereas they didn't

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Brian Schott via Digitalmars-d
On Saturday, 21 June 2014 at 19:41:42 UTC, Jonathan M Davis via Digitalmars-d wrote: And to add to that, this proposal doesn't even make things consistent. You _still_ have to explain why some attributes have @ and some don't. It's just that now two of them have @ whereas they didn't before.

Re: DIP64: Attribute Cleanup

2014-06-21 Thread francesco cattoglio via Digitalmars-d
On Saturday, 21 June 2014 at 20:48:41 UTC, Brian Schott wrote: I think the proposal said that the type constructors would be exempt, You wouldn't have @const but you would have @final. I think you needed to underline this part better. This is indeed extremely important, and that is the reason

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Mason McGill via Digitalmars-d
On Friday, 20 June 2014 at 22:01:31 UTC, Timon Gehr wrote: On 06/20/2014 09:22 PM, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Jonathan M Davis via Digitalmars-d
On Sun, 22 Jun 2014 00:12:20 + Mason McGill via Digitalmars-d digitalmars-d@puremagic.com wrote: Attribute and property are pretty much synonyms in English, and it always seemed strange to me that D had to define them as different--yet confusingly similar--entities. They're not even

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Jonathan M Davis via Digitalmars-d
On Sat, 21 Jun 2014 20:48:40 + Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: On Saturday, 21 June 2014 at 19:41:42 UTC, Jonathan M Davis via Digitalmars-d wrote: And to add to that, this proposal doesn't even make things consistent. You _still_ have to explain why

Re: DIP64: Attribute Cleanup

2014-06-21 Thread Mason McGill via Digitalmars-d
On Sunday, 22 June 2014 at 05:18:05 UTC, Jonathan M Davis via Digitalmars-d wrote: On Sun, 22 Jun 2014 00:12:20 + Mason McGill via Digitalmars-d digitalmars-d@puremagic.com wrote: Attribute and property are pretty much synonyms in English, and it always seemed strange to me that D had to

DIP64: Attribute Cleanup

2014-06-20 Thread Brian Schott via Digitalmars-d
http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues.

Re: DIP64: Attribute Cleanup

2014-06-20 Thread H. S. Teoh via Digitalmars-d
On Fri, Jun 20, 2014 at 07:22:02PM +, Brian Schott via Digitalmars-d wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Meta via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues.

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Brad Anderson via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues. I

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Gary Willoughby via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues.

Re: DIP64: Attribute Cleanup

2014-06-20 Thread w0rp via Digitalmars-d
On Friday, 20 June 2014 at 19:22:04 UTC, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues. It

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Brian Schott via Digitalmars-d
On Friday, 20 June 2014 at 19:48:49 UTC, H. S. Teoh via Digitalmars-d wrote: First, there is no way to mark a function as *impure* as opposed to pure (leaving out pure is not an option in template functions due to automatic attribute inference). Also, there's an inconsistency between positive

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Steven Schveighoffer via Digitalmars-d
On Fri, 20 Jun 2014 15:47:07 -0400, H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: On Fri, Jun 20, 2014 at 07:22:02PM +, Brian Schott via Digitalmars-d wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Steven Schveighoffer via Digitalmars-d
On Fri, 20 Jun 2014 15:22:02 -0400, Brian Schott briancsch...@gmail.com wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Timon Gehr via Digitalmars-d
On 06/20/2014 09:22 PM, Brian Schott wrote: http://wiki.dlang.org/DIP64 Attributes in D have two problems: 1. There are too many of them and declarations are getting too verbose 2. New attributes use @ and the old ones do not. I've created a DIP to address these issues. Why not make the

Re: DIP64: Attribute Cleanup

2014-06-20 Thread Philpax via Digitalmars-d
+1 to this proposal; as someone trying to annotate their D code appropriately, the inconsistency in the usage of @ forces me to look up the docs every time, which leads to considerable productivity loss. I'm sure it's less of an issue when one is sufficiently versed in annotation, but I find