On Tuesday, 21 June 2022 at 01:39:43 UTC, Paul Backus wrote:
On Tuesday, 14 June 2022 at 05:35:46 UTC, JG wrote:
On Monday, 13 June 2022 at 21:45:39 UTC, Paul Backus wrote:
The call to `move` is coming from `SumType.opAssign`:
https://github.com/dlang/phobos/blob/v2.100.0/std/sumtype.d#L681
On Tuesday, 14 June 2022 at 05:35:46 UTC, JG wrote:
On Monday, 13 June 2022 at 21:45:39 UTC, Paul Backus wrote:
The call to `move` is coming from `SumType.opAssign`:
https://github.com/dlang/phobos/blob/v2.100.0/std/sumtype.d#L681
I've filed a bugzilla issue for this here:
On Monday, 20 June 2022 at 19:08:32 UTC, max haughton wrote:
On Monday, 20 June 2022 at 17:48:48 UTC, Antonio wrote:
Is there any way to specify that a variable, member or
parameter can't be null?
You can use an invariant if it's a member of an aggregate but
be warned that these are only
On Monday, 20 June 2022 at 17:48:48 UTC, Antonio wrote:
Is there any way to specify that a variable, member or
parameter can't be null?
You can use an invariant if it's a member of an aggregate but be
warned that these are only checked at the boundaries of public
member functions.
On Monday, 20 June 2022 at 17:48:48 UTC, Antonio wrote:
Is there any way to specify that a variable, member or
parameter can't be null?
Depends on the type. Basic types can't be null. Pointers and
classes can always be `null`, though you could wrap them in a
custom library type that doesn't
Is there any way to specify that a variable, member or parameter
can't be null?
On 6/20/22 07:00, Gary Chike wrote:
> Would it be appropriate to forego `readf`
> and read input as a string using `readln` ,benefiting from the `strip`
> function, then convert to their appropriate datatype
Makes sense. The following are related as well:
I should have qualified the above with: _ and I will be
performing operations on the numeric datatype, since just
outputting simply strings, as in the above example, would require
nothing more than string data types. :)
```d
module hello_world;
import std.stdio;
import std.string; // strip()
On Monday, 20 June 2022 at 00:43:17 UTC, Ali Çehreli wrote:
...
But when the program interacts with piped data, there may be
multiple \n characters and all of those might have to be
ignored before reading the next non-empty line. So you may want
to do readln.strip multiple times? I don't
Is there any way to define variables in an outer scope from an inner
scope? I was thinking
```d
void main()
{
int .y = 3;
}
```
would work, but it doesn't.
On 6/17/22 8:48 AM, harakim wrote:
On Friday, 17 June 2022 at 12:31:45 UTC, harakim wrote:
I can generically convert a string to a type using to!type. I have a
read function that does that. I have simplified the example below:
```d
int readNumber()
{
return read!int(val =>
On 6/17/22 8:09 AM, Chris Katko wrote:
I don't need this functionality, but I wanted to be sure.
Does function overloading not work with nested functions? I got a
compiler error (something like "function already defined") when I tried it.
Correct, it's not allowed.
However, you can define a
It seems I solved most of the problems by modifying event
handling.
I'll continue solving further ones and adding more functionality.
13 matches
Mail list logo