On Monday, 10 January 2022 at 01:16:31 UTC, forkit wrote:
On Sunday, 9 January 2022 at 21:56:05 UTC, Salih Dincer wrote:
Try the @trusted and in/out:
...
..
.
thanks for introducing me to the in/out feature of D :-)
I'll certainly look into that feature more.
But my question still remains:
On Sunday, 9 January 2022 at 21:56:05 UTC, Salih Dincer wrote:
Try the @trusted and in/out:
...
..
.
thanks for introducing me to the in/out feature of D :-)
I'll certainly look into that feature more.
But my question still remains:
//pointers ~= &str; // why is this *not* allowed in @safe
On Sunday, 9 January 2022 at 20:58:05 UTC, forkit wrote:
Do not understand why one line is not considered @safe, but the
other is.
//
module test;
import std;
@safe void main()
{
immutable string[] strings = ["one", "one", "two"];
immutable(string)*[] pointers = null;
forea
Do not understand why one line is not considered @safe, but the
other is.
//
module test;
import std;
@safe void main()
{
immutable string[] strings = ["one", "one", "two"];
immutable(string)*[] pointers = null;
foreach(size_t i, ref str; strings)
{
if(str == "on
On Sunday, 9 January 2022 at 03:15:02 UTC, Ali Çehreli wrote:
What would work in the code above is 'choice':
char q = choice(allowed_chars);
But that hits another fact of D: arrays of chars are strings,
which cannot be RandomAccessRange because individual chars must
be decoded to form dchar