The D standard library is built on GC, is that a negative or positive?

Tejas notrealemail at gmail.com
Fri Dec 16 15:42:30 UTC 2022


On Friday, 16 December 2022 at 14:05:37 UTC, IGotD- wrote:
> On Friday, 16 December 2022 at 13:56:19 UTC, bauss wrote:
>>
>> Personally I think it should always just be implied const like:
>>
>> catch (Exception e) should imply catch (const e) that way both 
>> mutable and immutable will work.
>
> Shouldn't that be like in C++ where the it is recommended to use
>
> ```cpp
> catch(const MyException& e)
> ```
>
> so in in D it would be
>
> ```cpp
> catch(const ref MyException e)
> ```

Classes are reference types in D, so I think the `ref` is implicit


More information about the Digitalmars-d mailing list