On Tue, Oct 01, 2024 at 04:30:27PM +, Salih Dincer via Digitalmars-d-learn
wrote:
[...]
> > ```
> Please add this to your MyCon structure:
> ```d
> alias value this;
> // assert(num1 == 3.14);
> ```
> And test it like this too, I think it's awesome!
[...]
IMO it's not a good idea to recommend
On Tuesday, 1 October 2024 at 16:18:17 UTC, Salih Dincer wrote:
```d
// ...
struct MyCon
{
string input;
T value;
this(string data)
{
// ...
}
// ...
}
}
```
Please add this to your MyCon structure:
```d
alias value this;
// assert(num1 == 3
On Tuesday, 1 October 2024 at 01:00:08 UTC, Andy Valencia wrote:
... A conversion like:
auto d = atoi!double("123.456");
is about 4k of code. Nice!
Congratulations on your initiative. D is very flexible with
templates, especially with the mixin templates. For example, you
might like t
On Tuesday, 1 October 2024 at 11:45:35 UTC, monkyyy wrote:
On Tuesday, 1 October 2024 at 05:44:16 UTC, H. S. Teoh wrote:
why spend the time and effort when you could have just done:
```
import std.conv;
theres a bunch of relivent tradeoffs and phoboes doesnt make a
good set of them
To be f
On Tuesday, 1 October 2024 at 05:44:16 UTC, H. S. Teoh wrote:
why spend the time and effort when you could have just done:
```
import std.conv;
theres a bunch of relivent tradeoffs and phoboes doesnt make a
good set of them
On Tue, Oct 01, 2024 at 01:00:08AM +, Andy Valencia via Digitalmars-d-learn
wrote:
> I had an old atoi() I wrote when I was getting started with D. You know,
> fixed type, string in, int output. Today for fun I templated the type:
>
> T atoi(T)(string s)
[...]
It's all good and fun to try