Re: Which D compiler is the most maintained and future-proof? [DMD GDC and LDC]

2023-07-25 Thread Ernesto Castellotti via Digitalmars-d-learn
On Monday, 24 July 2023 at 13:51:18 UTC, Richard (Rikki) Andrew Cattermole wrote: On 25/07/2023 1:26 AM, devosalain wrote: I could be interesting to also compare the licenses of the 3 compilers. There isn't a huge difference between them. The frontend, druntime and most of phobos (minus zlib

Re: How to free memory ater use of "new" to allocate it.

2023-07-17 Thread Ernesto Castellotti via Digitalmars-d-learn
On Monday, 17 July 2023 at 16:52:00 UTC, Alain De Vos wrote: This works also, ``` class C { int * pa; int [] a; // Constructor this() {writefln("Called constructor"); pa=cast(int *)malloc(1000*int.sizeof); a=pa[0..1000]; } } void

Re: unittest under betterC

2023-06-05 Thread Ernesto Castellotti via Digitalmars-d-learn
On Monday, 5 June 2023 at 18:14:31 UTC, DLearner wrote: On Monday, 5 June 2023 at 14:25:33 UTC, Mike Parker wrote: [...] Thank you for the link, can confirm that: ``` int foo() { [...] It's not so easy to deal automatically in case of multiple modules

Re: Indenting standards religions K, whitesmiths etc

2023-05-31 Thread Ernesto Castellotti via Digitalmars-d-learn
On Thursday, 1 June 2023 at 03:34:33 UTC, Cecil Ward wrote: On Wednesday, 31 May 2023 at 22:06:50 UTC, Ernesto Castellotti wrote: On Wednesday, 31 May 2023 at 16:24:38 UTC, Cecil Ward wrote: [...] Excuse me but for me the only style I like is the K I can accept Allman but the rest is

Re: Indenting standards religions K, whitesmiths etc

2023-05-31 Thread Ernesto Castellotti via Digitalmars-d-learn
On Wednesday, 31 May 2023 at 16:24:38 UTC, Cecil Ward wrote: I wanted to ask how some of the leaders of our group feel about D indentation standards. `i realise that this causes some religious fervour in C. I could be in trouble here because in all my years at work, we never used K & R ‘one

Re: Multiple destructors

2023-05-26 Thread Ernesto Castellotti via Digitalmars-d-learn
On Friday, 26 May 2023 at 09:39:29 UTC, Alex Biscotti wrote: On Friday, 26 May 2023 at 09:24:29 UTC, Ernesto Castellotti wrote: On Friday, 26 May 2023 at 09:17:34 UTC, Alex Biscotti wrote: On Friday, 26 May 2023 at 09:11:47 UTC, Ernesto Castellotti wrote: On Friday, 26 May 2023 at 09:07:07

Re: Multiple destructors

2023-05-26 Thread Ernesto Castellotti via Digitalmars-d-learn
On Friday, 26 May 2023 at 09:17:34 UTC, Alex Biscotti wrote: On Friday, 26 May 2023 at 09:11:47 UTC, Ernesto Castellotti wrote: On Friday, 26 May 2023 at 09:07:07 UTC, Alex Biscotti wrote: Hello everyone! While researching the phobos library, I discovered that a class can have multiple

Re: Multiple destructors

2023-05-26 Thread Ernesto Castellotti via Digitalmars-d-learn
On Friday, 26 May 2023 at 09:07:07 UTC, Alex Biscotti wrote: Hello everyone! While researching the phobos library, I discovered that a class can have multiple destructors if the destructors are added via mixin injection. Accordingly, the question is whether a description of such feature should

Re: Dynamically calling shared objects from statically build executable allowed

2020-02-10 Thread Ernesto Castellotti via Digitalmars-d-learn
On Monday, 10 February 2020 at 19:00:36 UTC, Andre Pany wrote: On Monday, 10 February 2020 at 13:14:50 UTC, Ernesto Castellotti wrote: On Monday, 10 February 2020 at 04:41:31 UTC, Andre Pany wrote: Is this a bug with LDC and DMD, or is it not allowed to dynamically call a SO from a statically

Re: Dynamically calling shared objects from statically build executable allowed

2020-02-10 Thread Ernesto Castellotti via Digitalmars-d-learn
On Monday, 10 February 2020 at 04:41:31 UTC, Andre Pany wrote: Is this a bug with LDC and DMD, or is it not allowed to dynamically call a SO from a statically build executable on linux On Unix systems it is not possible to dynamically load a library shared by a static executable, I don't

Re: Using a char value >= 128

2019-10-27 Thread Ernesto Castellotti via Digitalmars-d-learn
On Sunday, 27 October 2019 at 14:36:54 UTC, Ernesto Castellotti wrote: On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote: [...] char in D is always unsigned, it is not implementation-specific. Therefore it can take values ​​up to (2^8)−1, If you want a signed 8 byte type you can

Re: Using a char value >= 128

2019-10-27 Thread Ernesto Castellotti via Digitalmars-d-learn
On Sunday, 27 October 2019 at 12:44:05 UTC, Per Nordlöw wrote: In which circumstances can a `char` be initialized a non-7-bit value (>= 128)? Is it possible only in non-@safe code? And, if so, what will be the result of casting such a value to `dchar`? Will that result in an exception or will

Re: problems with swig generated code

2019-09-12 Thread Ernesto Castellotti via Digitalmars-d-learn
On Tuesday, 3 September 2019 at 20:03:37 UTC, Martin DeMello wrote: On Sunday, 1 September 2019 at 11:19:11 UTC, DanielG wrote: Do you know whether SWIG's D generator is even being maintained? I've searched for it on the forums in the past and got the impression that it's outdated. I

Re: Java to D

2019-08-31 Thread Ernesto Castellotti via Digitalmars-d-learn
On Wednesday, 28 August 2019 at 08:14:25 UTC, GreatSam4sure wrote: Good day everyone. DWT is a library for creating cross-platform GUI applications. It's a port of the SWT Java library from Eclipse. Currently supported platforms are Windows, using Win32 and Linux, using GTK. [...]