Re: Newbie style question about string constants

2025-02-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, February 24, 2025 9:07:07 AM MST Ian via Digitalmars-d-learn wrote: > Hello, > > What's the recommended D way to declare a string constant? Say, > for example, for a path used inside a class constructor? I've > seen const string, immutable, enum etc... > > Is this the place for these kin

Re: Newbie style question about string constants

2025-02-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, February 24, 2025 11:19:48 AM MST Elias Batek (0xEAB) via Digitalmars-d-learn wrote: > For string constants you’ll usually want to mark them as `static > immutable`. Strings with this combination will usually be put > into read-only sections (ROM) of the resulting binaries. > > Unlike `

Re: Newbie style question about string constants

2025-02-24 Thread Elias Batek (0xEAB) via Digitalmars-d-learn
On Monday, 24 February 2025 at 16:07:07 UTC, Ian wrote: Hello, What's the recommended D way to declare a string constant? Say, for example, for a path used inside a class constructor? I've seen const string, immutable, enum etc... Is this the place for these kinds of questions? Is there a D

Re: Newbie style question about string constants

2025-02-24 Thread monkyyy via Digitalmars-d-learn
On Monday, 24 February 2025 at 16:07:07 UTC, Ian wrote: Hello, What's the recommended D way to declare a string constant? Say, for example, for a path used inside a class constructor? I've seen const string, immutable, enum etc... enum vs value is a tradeoff of when a decision is made; not s

Newbie style question about string constants

2025-02-24 Thread Ian via Digitalmars-d-learn
Hello, What's the recommended D way to declare a string constant? Say, for example, for a path used inside a class constructor? I've seen const string, immutable, enum etc... Is this the place for these kinds of questions? Is there a D stack overflow? Cheers, Ian

Re: Intro to calling C libraries

2025-02-24 Thread Ian via Digitalmars-d-learn
Sweet!

setjmp support for windows.

2025-02-24 Thread zz via Digitalmars-d-learn
Hi, Is setjmp/longjmp supported under windows? Regards, zz