Worst ideas/features in programming languages?

Timon Gehr timon.gehr at gmx.ch
Tue Nov 9 16:44:50 UTC 2021


On 09.11.21 16:39, Atila Neves wrote:
> On Tuesday, 9 November 2021 at 13:26:20 UTC, Ola Fosheim Grøstad wrote:
>> On Tuesday, 9 November 2021 at 11:37:49 UTC, Atila Neves wrote:
>>>> It means you now loose context
>>>
>>> I don't see how.
>>
>> In D you can throw a wide variety of exceptions and propagate them 
>> without even knowing that they were thrown. D even retains the 
>> exception chain… (perhaps too much context for most use cases). 
>> Clearly you loose context by "?" in comparison? Python also allows you 
>> to trace the stack… that is a lot of context…
> 
> If there are no exceptions and one is returning regular values, then the 
> call stack is... the call stack. Given that "?" returns the original 
> failure with whatever extra data it had, I really don't see what the 
> difference is.
> 
> 

Having a stack trace with line numbers is a big deal in case the 
exception was unexpected.


More information about the Digitalmars-d mailing list