Worst ideas/features in programming languages?
user1234
user1234 at 12.de
Fri Dec 17 17:50:25 UTC 2021
On Friday, 17 December 2021 at 13:33:00 UTC, Tejas wrote:
> On Friday, 17 December 2021 at 13:14:50 UTC, Igor wrote:
>> On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:
>>> [...]
>>
>> I am a bit late to this party :) but after reading all 29
>> pages of it I would say most of it is said except this one
>> thing:
>>
>> I hate language constructs that go in opposite order from my
>> thoughts making me type something then having to navigate back
>> to add another thing. Best example for this is casting in any
>> language. I always have to write cast operator before the
>> thing I am casting yet in my head I never think "then I need
>> to cast to int the variable X that I want to add". I think
>> more like "Then I need to add variable X but I have to cast it
>> to int".
>
> You must love the `to` template in `std.conv` then :P
That's indeed a good way to have cast as postfix expressions
except that `to` is more than cast, as it also checks for
overflow and can throw.
More information about the Digitalmars-d
mailing list