Re: Programs in D are huge

2022-08-18 Thread Diego via Digitalmars-d-learn
On Wednesday, 17 August 2022 at 17:25:51 UTC, Ali Çehreli wrote: On 8/17/22 09:28, Diego wrote: > I'm writing a little terminal tool, so i think `-betterC` is the best > and simple solution in my case. It depends on what you mean with terminal tool bun in general, no, full features of D is

Re: Programs in D are huge

2022-08-17 Thread Diego via Digitalmars-d-learn
Thank you to everyone, I'm writing a little terminal tool, so i think `-betterC` is the best and simple solution in my case.

Programs in D are huge

2022-08-16 Thread Diego via Digitalmars-d-learn
Hello everyone, I'm a Java programmer at work but i'm learning D for pleasure. I'm reading _The D Programming Language by Ali Çehreli_. I noticed that DMD creates very huge executable, for example an empty program: ``` empty.d: void main() { } ``` after a compilation with these

Re: Encouraging preliminary results implementing memcpy in D

2018-06-14 Thread Diego via Digitalmars-d-announce
On Wednesday, 13 June 2018 at 06:46:43 UTC, Mike Franklin wrote: I had a little fun today kicking the crap out of C's memcpy with a D implementation. https://github.com/JinShil/memcpyD Request for help: I don't have a Linux system running on real hardware at this time, nor do I have a wide

Re: Why does this not compile?

2018-03-06 Thread Diego via Digitalmars-d
On Tuesday, 6 March 2018 at 10:03:54 UTC, Shachar Shemesh wrote: void main() { struct S { uint value; ~this() { } } const S a = S(12); S b = a; } You cannot assign a const element (`a`) to a non-const element (`b`) in `S b = a` expression. To make de

Re: Is there a cleaner way of doing this?

2017-08-07 Thread Diego via Digitalmars-d
On Monday, 7 August 2017 at 08:01:26 UTC, Shachar Shemesh wrote: It is often desired to have a struct with an extra parameter. The common way to do this is like so: struct S(T) { T param; void initialize(T param) { this.param = param; // Other