On Friday, 16 February 2024 at 03:21:48 UTC, andy wrote:
It still seems to be considered mutable?
I got this working using a function pointer:
```
@safe:
void main() {
string a = "a";
string ab = "ab";
string ab2 = a ~ "b";
assert(ab.ptr != ab2.ptr);
as
On 16/02/2024 4:21 PM, andy wrote:
On Friday, 16 February 2024 at 01:26:42 UTC, Richard (Rikki) Andrew
Cattermole wrote:
You can use const instead which doesn't have any such guarantees and
it'll work with a pure function :)
It still seems to be considered mutable?
pure void main() {
On Friday, 16 February 2024 at 01:26:42 UTC, Richard (Rikki)
Andrew Cattermole wrote:
You can use const instead which doesn't have any such
guarantees and it'll work with a pure function :)
It still seems to be considered mutable?
pure void main() {
// a.d(2): Error: `pure` funct
On 16/02/2024 12:46 PM, andy wrote:
If you make global variables |immutable|, you can access them in
|pure| functions.
Is it as simple as that? I'd have to cast away the |immutable| when
adding a new interned string though. Is that still the correct way to do it?
No.
It was never cor
On Thursday, 15 February 2024 at 15:24:37 UTC, IchorDev wrote:
You can make a scope with `nothrow`, `@nogc`, etc.:
I've been setting `@safe @nogc pure nothrow:` at the top of
(almost) every module, but then I still have to do it at the top
of each struct in the module (if it has functions) a
On Saturday, 10 February 2024 at 12:06:24 UTC, zeuseditor wrote:
Some time ago, a problem reported showed Zeus would fail to
debug D code when using the GDB debugger. That issue related to
the fact the version of GDB shipped with Zeus was outdated.
The latest release of Zeus now ships with the
On Thursday, 15 February 2024 at 04:32:27 UTC, andy wrote:
* Having to write `@safe @nogc pure nothrow` all the time. It
needs a way to make that the default and mark specific things
as not-safe or not-pure.
You can make a scope with `nothrow`, `@nogc`, etc.:
```d
nothrow @nogc pure @safe{
voi