Re: How can I tell D that function args are @nogc etc.

2024-04-13 Thread Monkyyy via Digitalmars-d-learn
On Friday, 12 April 2024 at 03:57:40 UTC, John Dougan wrote: Not every day you get to blame a compiler bug. D is uniquely: hacky, expressive and buggy. Having more metaprograming then c++ without the raw man power comes at a cost, in d you should distrust the spec and instead see what the

Re: How can I tell D that function args are @nogc etc.

2024-04-12 Thread John Dougan via Digitalmars-d-learn
On Friday, 12 April 2024 at 15:08:50 UTC, Steven Schveighoffer wrote: On Friday, 12 April 2024 at 03:57:40 UTC, John Dougan wrote: What is the procedure for bug reporting? I'm looking at the issues tracker and have no clue how to drive the search to see if this is already there.

Re: How can I tell D that function args are @nogc etc.

2024-04-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On Friday, 12 April 2024 at 03:57:40 UTC, John Dougan wrote: What is the procedure for bug reporting? I'm looking at the issues tracker and have no clue how to drive the search to see if this is already there. https://issues.dlang.org While entering the bug title, it does a fuzzy search

Re: How can I tell D that function args are @nogc etc.

2024-04-11 Thread John Dougan via Digitalmars-d-learn
On Thursday, 11 April 2024 at 15:00:49 UTC, Steven Schveighoffer wrote: So D can provide a nice mechanism to show what is happening -- `pragma(msg, ...)` If I do that with the two types above I see something *very* interesting: ```d pragma(msg, FnPrefixT); pragma(msg, FnSuffixT); ``` ```

Re: How can I tell D that function args are @nogc etc.

2024-04-11 Thread Steven Schveighoffer via Digitalmars-d-learn
On Thursday, 11 April 2024 at 03:17:36 UTC, John Dougan wrote: Interesting. Thank you to both of you. On Wednesday, 10 April 2024 at 17:38:21 UTC, Steven Schveighoffer wrote: On Wednesday, 10 April 2024 at 11:34:06 UTC, Richard (Rikki) Andrew Cattermole wrote: Place your attributes on the

Re: How can I tell D that function args are @nogc etc.

2024-04-10 Thread John Dougan via Digitalmars-d-learn
Interesting. Thank you to both of you. On Wednesday, 10 April 2024 at 17:38:21 UTC, Steven Schveighoffer wrote: On Wednesday, 10 April 2024 at 11:34:06 UTC, Richard (Rikki) Andrew Cattermole wrote: Place your attributes on the right hand side of the function, not the left side. Use the left

Re: How can I tell D that function args are @nogc etc.

2024-04-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On Wednesday, 10 April 2024 at 11:34:06 UTC, Richard (Rikki) Andrew Cattermole wrote: Place your attributes on the right hand side of the function, not the left side. Use the left side for attributes/type qualifiers that go on the return type. Just a word of warning, this explanation

Re: How can I tell D that function args are @nogc etc.

2024-04-10 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Place your attributes on the right hand side of the function, not the left side. Use the left side for attributes/type qualifiers that go on the return type. ```d bool[7] stagesToProcess = false; bool shouldDoInStages(int index) @nogc nothrow @safe { return stagesToProcess[index]; }

How can I tell D that function args are @nogc etc.

2024-04-09 Thread John Dougan via Digitalmars-d-learn
Below is a example program that illustrates my issue. When compiled at run.dlang I get: ``` onlineapp.d(18): Error: `@safe` function `onlineapp.processSafely!(1, 4).processSafely` cannot call `@system` function pointer `shouldDo` onlineapp.d(28): Error: template instance