Re: Effective String to Date conversion?

2024-01-28 Thread Mengu via Digitalmars-d-learn
On Monday, 22 January 2024 at 10:56:04 UTC, atzensepp wrote: Dear D-gurus, being new to D I am trying my first steps and the language is quite intuitive and appealing. When reading a file and creating a hash for the reocrds I want to get only the most recent ones. For this I need to convert D

Re: length's type.

2024-01-28 Thread mw via Digitalmars-d-learn
On Sunday, 28 January 2024 at 16:16:34 UTC, Olivier Pisano wrote: If .length were to be an int, D could not handle array of more than 2G bytes. The whole language would be useless on 64 bit systems. The array.length better to be *signed* `long` (signed size_t) instead of unsigned. Can yo

Re: length's type.

2024-01-28 Thread monkyyy via Digitalmars-d-learn
On Thursday, 18 January 2024 at 02:55:37 UTC, zjh wrote: Can you change the type of 'length' from 'ulong' to 'int', so I haven't to convert it every time! The devs are obviously very very wrong here I underflow indexs all the time But this is a pretty dead fight, I'd aim for a smart index ty

Re: length's type.

2024-01-28 Thread monkyyy via Digitalmars-d-learn
On Sunday, 28 January 2024 at 16:16:34 UTC, Olivier Pisano wrote: On Sunday, 28 January 2024 at 08:55:54 UTC, zjh wrote: On Sunday, 28 January 2024 at 06:34:13 UTC, Siarhei Siamashka wrote: The explicit conversion `.length.to!int` has an extra benefit I rarely use numbers over one million.

Re: length's type.

2024-01-28 Thread Olivier Pisano via Digitalmars-d-learn
On Sunday, 28 January 2024 at 08:55:54 UTC, zjh wrote: On Sunday, 28 January 2024 at 06:34:13 UTC, Siarhei Siamashka wrote: The explicit conversion `.length.to!int` has an extra benefit I rarely use numbers over one million. But do I have to consider numbers over `4 billion` every day? If

Re: length's type.

2024-01-28 Thread zjh via Digitalmars-d-learn
On Sunday, 28 January 2024 at 06:34:13 UTC, Siarhei Siamashka wrote: The explicit conversion `.length.to!int` has an extra benefit I rarely use numbers over one million. But do I have to consider numbers over `4 billion` every day?