Re: Inherited constructor

2025-07-24 Thread Andy Valencia via Digitalmars-d-learn
On Friday, 25 July 2025 at 02:40:35 UTC, H. S. Teoh wrote: In D, constructors are not inherited, so yes, unfortunately you have to write a forwarding ctor that passes the arguments along to the base class. My OO worldview goes back to Smalltalk, where constructors are "just" methods and thus

Re: std.random.uniform(1, 101) crashes. Why, and workaround.

2025-07-24 Thread monkyyy via Digitalmars-d-learn
On Friday, 25 July 2025 at 01:04:31 UTC, Brother Bill wrote: _D3std6random__T15bcryptGenRandomTmZQuFNbNiNeJmZb linking is different then a runtime crash; restart your computer, reinstall, pray to dark gods, double check your install method was the intended way, try the backup install script,

Re: std.random.uniform(1, 101) crashes. Why, and workaround.

2025-07-24 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jul 25, 2025 at 01:04:31AM +, Brother Bill via Digitalmars-d-learn wrote: > From "Programming in D" book: > > import std.stdio; > import std.random; > > void main() { > int number = uniform(1, 101); > > writeln("Edit source/app.d to start your project."); > } >

Re: Inherited constructor

2025-07-24 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Jul 24, 2025 at 05:19:17PM +, Andy Valencia via Digitalmars-d-learn wrote: > What is considered the "clean" way to address this error: > > ``` > tst60.d(7): Error: class `tst60.B` cannot implicitly generate a > default constructor when base class `tst60.A` is missing a default > const

Re: Inherited constructor

2025-07-24 Thread Brother Bill via Digitalmars-d-learn
On Thursday, 24 July 2025 at 17:19:17 UTC, Andy Valencia wrote: What is considered the "clean" way to address this error: ``` tst60.d(7): Error: class `tst60.B` cannot implicitly generate a default constructor when base class `tst60.A` is missing a default constructor ``` Yes, this is a toy

std.random.uniform(1, 101) crashes. Why, and workaround.

2025-07-24 Thread Brother Bill via Digitalmars-d-learn
From "Programming in D" book: import std.stdio; import std.random; void main() { int number = uniform(1, 101); writeln("Edit source/app.d to start your project."); } Running it generates: phobos64.lib(random_6ea_855.obj) : error LNK2019: unresolved external sym

Re: How can one close issues fransferred from Bugzilla

2025-07-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On Thursday, 24 July 2025 at 18:31:58 UTC, Quirin Schroll wrote: For example, I originally filed [DMD#19271](https://github.com/dlang/dmd/issues/19271), but as far as GitHub is concerned, I’m not the author of that issue so I can’t close it. What’s the process for that? I can comment on that

Re: How can one close issues fransferred from Bugzilla

2025-07-24 Thread 0xEAB via Digitalmars-d-learn
On Thursday, 24 July 2025 at 18:31:58 UTC, Quirin Schroll wrote: I can comment on that issue, but how would anyone know I did? Luckily, GitHub has notifications! (Obviously that still requires people to have them enabled and actually check them out.)

How can one close issues fransferred from Bugzilla

2025-07-24 Thread Quirin Schroll via Digitalmars-d-learn
For example, I originally filed [DMD#19271](https://github.com/dlang/dmd/issues/19271), but as far as GitHub is concerned, I’m not the author of that issue so I can’t close it. What’s the process for that? I can comment on that issue, but how would anyone know I did?

Inherited constructor

2025-07-24 Thread Andy Valencia via Digitalmars-d-learn
What is considered the "clean" way to address this error: ``` tst60.d(7): Error: class `tst60.B` cannot implicitly generate a default constructor when base class `tst60.A` is missing a default constructor ``` Yes, this is a toy example, but it reflects something I'm doing in actual code. Th