On Monday, 5 June 2023 at 15:28:34 UTC, Paul Backus wrote:
Is there a reason you can't just make these fields `public`?
My bet is that OP actually wants to generate something like
```d
void setStrokeWidth(uint value)
{
if (value = strokeWidth) return;
strokeWidth = value;
On Tuesday, 13 June 2023 at 16:46:26 UTC, DLearner wrote:
Only a small thing, but is it intended that:
```
void main() {
// static assert (false, "Static Assert triggered");
assert(false, "Assert triggered");
}
```
produces
```
core.exception.AssertError@staticassertex01.d(4): Assert
On Thursday, 15 February 2024 at 03:17:11 UTC, Jonathan M Davis
wrote:
On Wednesday, February 14, 2024 7:17:15 PM MST Basile B. via
Digitalmars-d- learn wrote:
From what I remember, it was that there was no reference to
the
source. Things got blitted and you had to fix the copy, already
On Thursday, 14 December 2023 at 03:58:37 UTC, Joel wrote:
If I get user input, for example, how do I check to see if it's
a valid path, like, file name.
```d
// something like this:
if (getUserInput.isValidPath) {
...
}
```
https://dlang.org/phobos/std_file.html#exists
On Wednesday, 13 December 2023 at 12:49:14 UTC, fred wrote:
[...]
a bug ?
thanks anyway
Try to define the flag as static
```d
static shared(bool) isDone = false;
```
I dont know if that should be a compiler error to have local
shared (I tend to think yes as locals are specific to a frame,
On Thursday, 23 November 2023 at 16:33:52 UTC, DLearner wrote:
Code below is intended to test simple mixin with lambda
function under -betterC.
Works with full-D, but fails with 'needs GC' errors under
-betterC.
Why is this so, bearing in mind the concatenations are executed
at
compile, not
On Monday, 5 February 2024 at 14:26:45 UTC, Basile B. wrote:
On Tuesday, 30 January 2024 at 15:38:26 UTC, Paul Backus wrote:
[...]
This definitely isn't allowed in C or C++. I wonder what the
rationale is for having this behavior in D?
[1]: https://dlang.org/spec/expression.html
An
On Tuesday, 30 January 2024 at 15:38:26 UTC, Paul Backus wrote:
[...]
This definitely isn't allowed in C or C++. I wonder what the
rationale is for having this behavior in D?
[1]: https://dlang.org/spec/expression.html
An hypothesis is that this makes codegening the pre and the post
On Tuesday, 12 March 2024 at 05:38:03 UTC, Liam McGillivray wrote:
I am in need of a data type for holding direction information;
one of 8 directions on a single axis. They are named in terms
of compass directions. If D had a 4-bit datatype, I would just
use this and do `+=2` whenever I want
On Thursday, 14 March 2024 at 23:39:33 UTC, Liam McGillivray
wrote:
On Thursday, 14 March 2024 at 01:58:46 UTC, Richard (Rikki)
Andrew Cattermole wrote:
[...]
I tried to rework the functions to use bitwise operations, but
it was difficult to figure out the correct logic. I decided
that it's
On Friday, 15 March 2024 at 00:00:01 UTC, Richard (Rikki) Andrew
Cattermole wrote:
On 15/03/2024 12:47 PM, Basile B. wrote:
On Thursday, 14 March 2024 at 23:39:33 UTC, Liam McGillivray
wrote:
On Thursday, 14 March 2024 at 01:58:46 UTC, Richard (Rikki)
Andrew Cattermole wrote:
[...]
I tried
On Thursday, 14 March 2024 at 20:58:21 UTC, Andy Valencia wrote:
On Thursday, 14 March 2024 at 18:05:59 UTC, H. S. Teoh wrote:
...
The best way to do multi-type varags in D is to use templates:
import std;
void myFunc(Args...)(Args args) {
Thank you. The first parenthetical
On Saturday, 30 March 2024 at 09:35:24 UTC, Per Nordlöw wrote:
Does anybody recognize the error
```
Attribute 'nocapture' does not apply to function return values
%12 = call noalias nocapture align 8 ptr @_D3xxx(ptr nonnull
%10, { i64, ptr } %11) #2, !dbg !7978
Attribute 'nocapture' does
On Friday, 26 April 2024 at 13:25:34 UTC, Salih Dincer wrote:
You have a 5-item data tuples as Tuple(1, 2, 3, [1, 3], 5) and
implement the sum (total = 15) with the least codes using the
sum() function of the language you are coding...
Let's start with D:
Here's
701 - 714 of 714 matches
Mail list logo