Re: Is RDTSC pure?

2025-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 12, 2025 3:48:49 AM Mountain Daylight Time IchorDev via Digitalmars-d-learn wrote: > Recently I wanted to write a pure function that returns an > unpredictable number, so I decided to use RDTSC (and any > equivalent instruction for other CPU architectures) to do this, > since

Re: Preventing .init for Archive struct, Programming in D, page 295

2025-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 12, 2025 9:20:38 AM Mountain Daylight Time Brother Bill via Digitalmars-d-learn wrote: > Is is possible to 'disable' .init for a struct? Technically, yes, but you should absolutely never do it, and it will likely become illegal to do so at some point in the future. init is a

Re: Preventing .init for Archive struct, Programming in D, page 295

2025-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 12, 2025 5:58:57 PM Mountain Daylight Time Brother Bill via Digitalmars-d-learn wrote: > Is it time to consider D 3.x.x, that takes the best of D, > discards the mistakes, the mud and the hair, so most well written > D 2.x.x programs still work? Unless, something significant

Re: Discuss: Classes are well supported in D, with Design by Contracts. Shouldn't we take advantage of that?

2025-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 12, 2025 6:43:38 PM Mountain Daylight Time Brother Bill via Digitalmars-d-learn wrote: > I'm not clear about why 'class'es are on the 'avoid' list. It's more that there's rarely any reason to use classes in D for the average program. If you need inheritance and polymorphism,

Re: Discuss: Classes are well supported in D, with Design by Contracts. Shouldn't we take advantage of that?

2025-09-13 Thread Neto via Digitalmars-d-learn
On Saturday, 13 September 2025 at 15:26:15 UTC, H. S. Teoh wrote: On Sat, Sep 13, 2025 at 12:43:38AM +, Brother Bill via Digitalmars-d-learn wrote: [...] Whose avoid list? [...] what are those real profiles that you're using now?

Re: Microsoft chose Go instead of C# or Rust to rewrite TypeScript

2025-09-13 Thread Brother Bill via Digitalmars-d-learn
On Monday, 8 September 2025 at 20:10:52 UTC, Sergey wrote: On Monday, 8 September 2025 at 19:55:20 UTC, Neto wrote: Why isn't D production ready? One has to ask why to choose a production language. 1. First one has to be aware that it exists. a. See Eiffel and D Eiffel has been in prod

Re: help for example with Condition

2025-09-13 Thread novicetoo via Digitalmars-d-learn
On Thursday, 11 September 2025 at 09:51:55 UTC, Mikhail wrote: I don't understand what I should do? Define global variables as shared? Andrea Fontana reply more good than my. But I hope you read article for new knowledges. Anyway, IMHO, if you want use global variable from two ore more thread

Re: Preventing .init for Archive struct, Programming in D, page 295

2025-09-13 Thread Brother Bill via Digitalmars-d-learn
On Friday, 12 September 2025 at 15:24:46 UTC, Monkyyy wrote: On Friday, 12 September 2025 at 15:20:38 UTC, Brother Bill wrote: Is is possible to 'disable' .init for a struct? No (and honestly it's bad style to break the constructors) Please expound on why its 'bad style' to disable construct