Re: Crow programming language

2024-02-15 Thread andy via Digitalmars-d-announce
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

Re: Crow programming language

2024-02-15 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-announce
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() {

Re: Crow programming language

2024-02-15 Thread andy via Digitalmars-d-announce
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

Re: Crow programming language

2024-02-15 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-announce
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

Re: Crow programming language

2024-02-15 Thread andy via Digitalmars-d-announce
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

Re: Zeus GDB Dlang Support

2024-02-15 Thread NonNull via Digitalmars-d-announce
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

Re: Crow programming language

2024-02-15 Thread IchorDev via Digitalmars-d-announce
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