Re: ldc executable crashes with this code

2022-02-04 Thread forkit via Digitalmars-d-learn
On Friday, 4 February 2022 at 15:58:19 UTC, Stanislav Blinov wrote: .. ... As others have already stated, casting immutability away is something that has to be supported, e.g. to interface with const-agnostic APIs. `@safe` requires such casts to be more verbose, with good reason. I concede

Re: Approach to Integration Testing in D

2022-02-04 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Feb 04, 2022 at 12:38:08PM +, Vijay Nayar via Digitalmars-d-learn wrote: [...] > What is your approach to integration testing in D? Do you use > `unittest` blocks? Do you write stand-alone programs that interact > with a running version of your program? Is there a library that makes >

Re: ldc executable crashes with this code

2022-02-04 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Feb 04, 2022 at 03:58:19PM +, Stanislav Blinov via Digitalmars-d-learn wrote: [...] > As others have already stated, casting immutability away is something > that has to be supported, e.g. to interface with const-agnostic APIs. > `@safe` requires such casts to be more verbose, with

Re: Approach to Integration Testing in D

2022-02-04 Thread Mathias LANG via Digitalmars-d-learn
On Friday, 4 February 2022 at 12:38:08 UTC, Vijay Nayar wrote: Greetings everyone, ## Question What is your approach to integration testing in D? Do you use `unittest` blocks? Do you write stand-alone programs that interact with a running version of your program? Is there a library that

Re: Approach to Integration Testing in D

2022-02-04 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/4/22 7:38 AM, Vijay Nayar wrote: Greetings everyone, ## Question What is your approach to integration testing in D? Do you use `unittest` blocks? Do you write stand-alone programs that interact with a running version of your program? Is there a library that makes certain kinds of

Re: ldc executable crashes with this code

2022-02-04 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 4 February 2022 at 11:26:42 UTC, forkit wrote: If I had wrote the code below, then I should not expect anything, whatsoever, from the compiler. () @trustMe_I_am_a_complete_idiot { char[] palindrome = cast(char[])"able was I ere I saw elba"; } (); This is almost exactly what you

Approach to Integration Testing in D

2022-02-04 Thread Vijay Nayar via Digitalmars-d-learn
Greetings everyone, ## Question What is your approach to integration testing in D? Do you use `unittest` blocks? Do you write stand-alone programs that interact with a running version of your program? Is there a library that makes certain kinds of testing easier? For example, if I have a D

Re: ldc executable crashes with this code

2022-02-04 Thread forkit via Digitalmars-d-learn
On Friday, 4 February 2022 at 10:09:22 UTC, Patrick Schluter wrote: On Thursday, 3 February 2022 at 02:01:34 UTC, forkit wrote: On Thursday, 3 February 2022 at 01:57:12 UTC, H. S. Teoh wrote: would be nice if the compiler told me something though :-( i.e. "hey, dude, you really wanna to

Re: ldc executable crashes with this code

2022-02-04 Thread forkit via Digitalmars-d-learn
On Friday, 4 February 2022 at 10:09:22 UTC, Patrick Schluter wrote: On Thursday, 3 February 2022 at 02:01:34 UTC, forkit wrote: On Thursday, 3 February 2022 at 01:57:12 UTC, H. S. Teoh wrote: would be nice if the compiler told me something though :-( i.e. "hey, dude, you really wanna to

Re: ldc executable crashes with this code

2022-02-04 Thread Patrick Schluter via Digitalmars-d-learn
On Thursday, 3 February 2022 at 02:01:34 UTC, forkit wrote: On Thursday, 3 February 2022 at 01:57:12 UTC, H. S. Teoh wrote: would be nice if the compiler told me something though :-( i.e. "hey, dude, you really wanna to that?" would be nice if programmers (C or D) learnt that a typecast