Adding a new design constraint to D

Salih Dincer salihdb at hotmail.com
Sat Jun 18 08:49:30 UTC 2022


On Saturday, 18 June 2022 at 05:14:20 UTC, Max Samukha wrote:
> On Friday, 17 June 2022 at 21:40:58 UTC, Walter Bright wrote:
>> On 6/16/2022 4:45 AM, Olivier Pisano wrote:
>>> I am suggesting language design is hard.
>>
>> Not the least of which is there is no such thing as a correct 
>> language design. There are only tradeoffs.
>
> There is an inconsistent language design.

Is there for D; do you mean D! I think D Programming Language is 
consistent.  Even from Walter's example I see no problem?

```d
void main()
{
   for (int i = 1; i; --i)
   {
        //assert(i != 1); // error in loop block
   }
   // Equivalent:
   size_t singleLoopError = 1;
   do
   {
     assert(singleLoopError != 1);
   } while (--singleLoopError);
}
```

SDB at 79


More information about the Digitalmars-d mailing list