August 03, 2017
On 03.08.2017 22:06, 12345swordy wrote:
> On Thursday, 3 August 2017 at 19:45:12 UTC, Timon Gehr wrote:
>> On 03.08.2017 21:28, 12345swordy wrote:
>>> On Thursday, 3 August 2017 at 19:02:17 UTC, Timon Gehr wrote:
>>>> On 03.08.2017 20:32, 12345swordy wrote:
>>>>> [...]
>>>>
>>>> On 02.08.2017 15:50, 12345swordy wrote:
>>>>> [...]
>>>>
>>>> How would you use the proposed features to implement @safe or @nogc within C++?
>>>
>>> I am not interested in arguing about what I said or I didn't said.
>>
>> I don't understand the relevance of this sentence.
>>
>>> Regardless what you asking is ridiculous, as 1.) there is no gc exist in c++ in the first place
>> https://en.wikipedia.org/wiki/Boehm_garbage_collector
>>
>>> 2.)it's still a concept at this point of time which may be rejected in the future.
>>
>> How does that make my question ridiculous?
> You are splinting hairs here.

That's a quite poetic way to describe the futility of my endeavor to engage you in a productive discussion. Also see http://medical-dictionary.thefreedictionary.com/splinting . [1]

> The gc that you linked is a third party library, that is not the same as having it built into the language itself.

The C++ @nogc implementation would also not be built-in, and whether or not the memory allocator in question is built-in has no bearing on whether my question was ridiculous or not. (I.e. you are splitting hairs.)

> Clear difference.

Clear, yet irrelevant.


BTW: If you are not interested in actually discussing the applicability of the proposal to enforcing coding standards to the point you outlined (@safe and @nogc), we can stop at any time. I was just curious how you would achieve this.



[1] Note that here I was deliberately splitting hairs, to demonstrate the difference.
August 03, 2017
On 03.08.2017 22:54, Joakim wrote:
> On Thursday, 3 August 2017 at 19:02:17 UTC, Timon Gehr wrote:
>> On 03.08.2017 20:32, 12345swordy wrote:
>>> On Thursday, 3 August 2017 at 10:43:50 UTC, Kagamin wrote:
>>>> On Wednesday, 2 August 2017 at 20:28:38 UTC, 12345swordy wrote:
>>>>> ...No? I was referring to the c++ proposal paper.
>>>>
>>>> The paper doesn't propose to enforce coding standards to the point you want. D already does what the paper proposes.
>>> Page 2:
>>>
>>> "Enable writing
>>> compiler-enforced
>>> patterns for any purpose:
>>> coding standards
>>> (e.g., many
>>> Core Guidelines
>>> “enforce” rules)
>>> "
>>>
>>> Yes, it does, right there. Are you reading the same paper that I am?
>>
>> On 02.08.2017 15:50, 12345swordy wrote:
>>>   > Is it to much to ask for d developers to provide a way to enforce custom
>>> coding standards in a similar fashion that @nogc and @safe does?
>>
>> How would you use the proposed features to implement @safe or @nogc within C++?
> 
> I think you misread him.

It's very possible that there has been a misunderstanding, but I think then it happened earlier in the thread.

> He wants to enforce custom coding standards in D similar to how that proposal would allow, and he's comparing it to how D does it with attributes for @safe and @nogc, but he's not asking about @safe and @nogc specifically.

> Presumably, he's wondering if he can apply other attributes in D that could be used to enforce coding standards similar to the ones that C++ proposal enables.

If this is the case, then the answer is that D has similarly powerful compile-time reflection. The C++ proposal additionally has nice syntax to invoke the checks and can conveniently rewrite the implementation in-place (which is not possible in D in the same way). Another thing the C++ proposal has that is not in D is the ability to conveniently integrate custom error messages with built-in ones.
August 03, 2017
On Tuesday, 1 August 2017 at 22:06:28 UTC, Walter Bright wrote:
> On 7/31/2017 5:41 AM, Joakim wrote:
>> If he's right that C++ use is so balkanized, this will simplify some code but further balkanize the language.  That might be worth it for them, but rather than simplifying the language, it makes it more powerful and more complex, heading higher up into the hills rather than the lower ground he claims to be heading for.
>
> I can't say I understand the proposal, but if it is similar to AST macros, my argument against that is well known and similar to yours.

Can you give us a pointer to your arguments? Some of us (me) are not familiar with them.

Thanks!
August 03, 2017
On Thursday, 3 August 2017 at 22:17:57 UTC, Yuxuan Shui wrote:
> On Tuesday, 1 August 2017 at 22:06:28 UTC, Walter Bright wrote:
>> On 7/31/2017 5:41 AM, Joakim wrote:
>>> If he's right that C++ use is so balkanized, this will simplify some code but further balkanize the language.  That might be worth it for them, but rather than simplifying the language, it makes it more powerful and more complex, heading higher up into the hills rather than the lower ground he claims to be heading for.
>>
>> I can't say I understand the proposal, but if it is similar to AST macros, my argument against that is well known and similar to yours.
>
> Can you give us a pointer to your arguments? Some of us (me) are not familiar with them.
>
> Thanks!

30-page long thread from four years ago, enjoy: :D

http://forum.dlang.org/thread/l5otb1$1dhi$1@digitalmars.com

This post from Walter may summarize his feelings:

http://forum.dlang.org/post/l6co6u$vo$1@digitalmars.com
August 03, 2017
On Thursday, 3 August 2017 at 20:56:38 UTC, Timon Gehr wrote:
> On 03.08.2017 22:06, 12345swordy wrote:
>> On Thursday, 3 August 2017 at 19:45:12 UTC, Timon Gehr wrote:
>>> On 03.08.2017 21:28, 12345swordy wrote:
>>>> On Thursday, 3 August 2017 at 19:02:17 UTC, Timon Gehr wrote:
>>>>> On 03.08.2017 20:32, 12345swordy wrote:
>>>>>> [...]
>>>>>
>>>>> On 02.08.2017 15:50, 12345swordy wrote:
>>>>>> [...]
>>>>>
>>>>> How would you use the proposed features to implement @safe or @nogc within C++?
>>>>
>>>> I am not interested in arguing about what I said or I didn't said.
>>>
>>> I don't understand the relevance of this sentence.
>>>
>>>> Regardless what you asking is ridiculous, as 1.) there is no gc exist in c++ in the first place
>>> https://en.wikipedia.org/wiki/Boehm_garbage_collector
>>>
>>>> 2.)it's still a concept at this point of time which may be rejected in the future.
>>>
>>> How does that make my question ridiculous?
>> You are splinting hairs here.
>
> That's a quite poetic way to describe the futility of my endeavor to engage you in a productive discussion. Also see http://medical-dictionary.thefreedictionary.com/splinting . [1]
>
Not my problem if you don't like my answer. If you going to dispute my usage of the phrase "splinting hairs" by post a link to the said phrase and not actually point of the error of it then don't be surprised that if I dismiss it.

>> The gc that you linked is a third party library, that is not the same as having it built into the language itself.
>
> The C++ @nogc implementation would also not be built-in, and whether or not the memory allocator in question is built-in has no bearing on whether my question was ridiculous or not. (I.e. you are splitting hairs.)
>
I never said anything about a C++ @nogc implementation, that was you misreading my post. Which again is ridiculous, as c++ does not have gc built in. Apparently you don't understand that.

>> Clear difference.
>
> Clear, yet irrelevant.
>
Nope very relevant. Otherwise by that logic then c++03 have variadic templates by using the boost tuple library.
>
> BTW: If you are not interested in actually discussing the applicability of the proposal to enforcing coding standards to the point you outlined (@safe and @nogc), we can stop at any time. I was just curious how you would achieve this.
>
>
It quite understandable that you misunderstood my post that I had wrote.


August 03, 2017
On Thursday, 3 August 2017 at 22:38:08 UTC, Joakim wrote:
>
> 30-page long thread from four years ago, enjoy: :D
>
> http://forum.dlang.org/thread/l5otb1$1dhi$1@digitalmars.com
>
> This post from Walter may summarize his feelings:
>
> http://forum.dlang.org/post/l6co6u$vo$1@digitalmars.com

Would it be possible to implement @safe/@nogc/pure/nothrow with AST macros?
August 04, 2017
On Thursday, 3 August 2017 at 23:59:01 UTC, jmh530 wrote:
> On Thursday, 3 August 2017 at 22:38:08 UTC, Joakim wrote:
>>
>> 30-page long thread from four years ago, enjoy: :D
>>
>> http://forum.dlang.org/thread/l5otb1$1dhi$1@digitalmars.com
>>
>> This post from Walter may summarize his feelings:
>>
>> http://forum.dlang.org/post/l6co6u$vo$1@digitalmars.com
>
> Would it be possible to implement @safe/@nogc/pure/nothrow with AST macros?

Nope :)

It's doable with good introspection but local ast-node rewriting will not help.
Execpt if you can rewrite the macro itself.

But I'd strongly discourage such a solution.
August 04, 2017
On 04.08.2017 01:26, 12345swordy wrote:
>>>
>>
>> The C++ @nogc implementation would also not be built-in, and whether or not the memory allocator in question is built-in has no bearing on whether my question was ridiculous or not. (I.e. you are splitting hairs.)
>>
> I never said anything about a C++ @nogc implementation, that was you misreading my post.

Two parties are required for communication.

It was Kagamin who said:
> The paper doesn't propose to enforce coding standards to the point you want.

This is in reference to your earlier:
> 
> Regardless, what impress me the most is the part where it came be used to enforce coding standards at compile time. Which I am trying to look if it's possible with d and sadly no luck.
> 
> Is it to much to ask for d developers to provide a way to enforce custom coding standards in a similar fashion that @nogc and @safe does? 

Your answer to Kagamin was basically, "yes it does". You implied that you want to be able to enforce custom coding standards similar to @nogc and @safe, and then you said that the C++ proposal allows it. My question was "why?". It would have been perfectly fine at that point for you to clarify that that is not in fact what you meant, so next time maybe just do that. :)

> Which again is ridiculous, as c++ does not have gc built in. Apparently you don't understand that.

There is nothing to understand. A GC does not need to be built-in for someone to want to control its usage with an attribute.
August 04, 2017
On Friday, 4 August 2017 at 00:49:05 UTC, Timon Gehr wrote:
> This is in reference to your earlier:
And I have said "I am not interested in arguing about what I said or I didn't said" which you are literately doing right now. If trying to make yourself feel better by deliberating misrepresenting my post in order to justify your misunderstanding then be my guess. I am not interested having a conversation with you as it clear to me that you just doing this just to troll me. You not the first person who pull a stun like this and it certainly won't be the last.


Alex
August 04, 2017
On Friday, 4 August 2017 at 12:34:21 UTC, 12345swordy wrote:
> [ ... ]

I can understand that you don't want to be trolled.
Many other people feel the same way.
Therefore I'd ask you to reflect on what it means to be trolling.