Re:Carbon Language: An experimental successor to C++
by WalterBright on Tuesday July 19, 2022 @04:39PM
(#32157645)
If you use the @nogc attribute, D is fully nogc.
[ Parent
| on HN ]
Re:Carbon Language: An experimental successor to C++
by kinjalkishor on Tuesday July 19, 2022 @05:08PM
(#32158005)
Yes it is very useful addition. Hopefully stdlib will also be fully nogc soon. Of all available options I am most hopeful of dlang. While it doesn't still have taken off it still is improving a lot & has high chances of increased usage. (Python also took years).
Re:Carbon Language: An experimental successor to C++
by WalterBright on Tuesday July 19, 2022 @05:48PM
(#32158423)
It doesn't need to be fully nogc. Not using the parts that use the gc will cripple nothing. You'll know which ones use the gc because they won't compile with @nogc.
Re:Carbon Language: An experimental successor to C++
by dymk on Wednesday July 20, 2022 @12:01AM
(#32161272)
@nogc is fine, if you're okay with not being able to use large swaths of the standard library, and by extension, most popular D libraries.
Re:Carbon Language: An experimental successor to C++
by WalterBright on Wednesday July 20, 2022 @04:03AM
(#32162823)
Not much of the library is dependent on the GC. For example, only one of the algorithms is.
Re:Carbon Language: An experimental successor to C++
by skl131313 on Wednesday July 20, 2022 @11:06AM
(#32166820)
There's no "nogc" containers in phobos, or allocators, or an idiomatic way to do safe manual memory management. It expects you to do it the C way. It's also impossible to implement some things because of how D does moving. There's a DIP in the works to change how moving works, but it's overly complicated and bound to introduce even more bugs. https://github.com/dlang/DIPs/blob/master/DIPs/DIP1040.md
Re:Carbon Language: An experimental successor to C++
by kinjalkishor on Tuesday July 19, 2022 @05:10PM
(#32158024)
Yes I use @nogc on main itself, to catch all gc usage.