Worst ideas/features in programming languages?
Atila Neves
atila.neves at gmail.com
Mon Nov 8 14:08:32 UTC 2021
On Saturday, 6 November 2021 at 19:13:11 UTC, Paulo Pinto wrote:
> On Saturday, 6 November 2021 at 11:45:18 UTC, Ola Fosheim
> Grøstad wrote:
>> On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:
>>> I'm brainstorming about what I'll talk about at DConf, and
>>> during a conversation with Walter I thought it might be cool
>>> to talk about:
>>>
>>> * Worst features implemented in a non-toy language
>>
>> Worst line of reasoning for not having a feature is Go that
>> refuses to add exceptions because they don't think people will
>> do cleanup correctly, instead you are faced with 150% more
>> error-handling code (or code that ignore errors).
>>
>> Error handling in Rust also looks pretty atrocious, but I
>> haven't written anything more than toy programs in Rust.
>
> Go has exceptions, although they don't call them as such
> (panic/recover).
>
> Rust error handling is not easy by default, however there are
> some helper libraries to make it easier to do rail oriented
> programming, and they are in the process of adding vocabulary
> types for improved error handling, based on the experience of
> those libraries.
I thought Rust error handling wasn't easy by default until they
added the ? operator, at which point it became like exceptions
but better.
To me that was always the issue with error handling without
exceptions - how to easily just propagate it up (nearly always
what one wants to do). I think they nailed it.
More information about the Digitalmars-d
mailing list