Jump to page: 1 2 3
Thread overview
Classes in D with betterC
Nov 20, 2021
Walter Bright
Nov 20, 2021
rikki cattermole
Nov 20, 2021
Stanislav Blinov
Nov 21, 2021
Luís Ferreira
Nov 22, 2021
Stanislav Blinov
Nov 22, 2021
Luís Ferreira
Nov 23, 2021
Stanislav Blinov
Nov 23, 2021
Luís Ferreira
Nov 26, 2021
workman
Nov 26, 2021
Luís Ferreira
Nov 20, 2021
tsbockman
Nov 21, 2021
Luís Ferreira
Nov 20, 2021
zjh
Nov 21, 2021
Luís Ferreira
Nov 22, 2021
zjh
Nov 22, 2021
Luís Ferreira
Nov 20, 2021
zjh
Nov 21, 2021
russhy
Nov 21, 2021
rikki cattermole
Nov 21, 2021
russhy
Nov 21, 2021
zjh
November 19, 2021
https://lsferreira.net/posts/zet-1-classes-betterc-d/

by Luís Ferreira

It's currently on the front page of Hacker News:

https://news.ycombinator.com/
November 20, 2021
And then there are issues such as https://issues.dlang.org/show_bug.cgi?id=21416 which killed off any chance of me using them internally.
November 20, 2021
On Saturday, 20 November 2021 at 05:37:42 UTC, rikki cattermole wrote:
> And then there are issues such as https://issues.dlang.org/show_bug.cgi?id=21416 which killed off any chance of me using them internally.

...and the implementation, as presented, falls apart due to not forwarding arguments correctly. Not insurmountable, of course, although `forward` really should be an intrinsic and not a library function.

And due to looking for a `__dtor` instead of `__xdtor`. And due to the fact that ya can't use the proposed `destroy` function with a reference to base class and still call the destructor of derived class correctly, let alone infer attributes correctly. And due to it trusting the `pureFree` when it shouldn't.

Can't see anything news-worthy here. This has been possible for ages, and is still limited to wazoo by classes being married to druntime, pessimized by lack of proper forwarding in the language, and can't be @safe.
November 20, 2021

On Saturday, 20 November 2021 at 04:58:52 UTC, Walter Bright wrote:

>

https://lsferreira.net/posts/zet-1-classes-betterc-d/

by Luís Ferreira

Great! __traits(initSymbol, T) will solve some problems for my current project.

Some other class related issues I've run into trying to get going with classes in dasBetterC:

extern(C++) class dynamic casts are completely broken:
https://issues.dlang.org/show_bug.cgi?id=21690

The GC never calls extern(C++) class instance destructors:
https://issues.dlang.org/show_bug.cgi?id=21693

Non-mutable extern(D) class scope instances cannot be created:
https://issues.dlang.org/show_bug.cgi?id=21692

Template breaks return annotation for class reference returned by struct method:
https://issues.dlang.org/show_bug.cgi?id=22528

November 20, 2021

On Saturday, 20 November 2021 at 04:58:52 UTC, Walter Bright wrote:

>

https://lsferreira.net/posts/zet-1-classes-betterc-d/

by Luís Ferreira

I have translated it into Chinese

November 20, 2021

On Saturday, 20 November 2021 at 04:58:52 UTC, Walter Bright wrote:

>

https://lsferreira.net/posts/zet-1-classes-betterc-d/

by Luís Ferreira

I have translated it into Chinese.

November 20, 2021
On Saturday, 20 November 2021 at 04:58:52 UTC, Walter Bright wrote:
> Classes in D with betterC

I had a hope it's about changes in language/runtime...
November 21, 2021
as much as i love betterC

i think if we see classes in betterC, then we should have them require the *

otherwise it's repeating the same mistakes as D

betterC already is niche on its own, so let's do the move?


November 21, 2021
If -betterC get classes, can we please make them require to have the same syntax as structs/classes in C++

    MyClass* class = alloc!MyClass;


otherwise i don't think the name "betterC" should remain.. that would be repeating same D's mistake (in my opinion)
November 21, 2021

On Saturday, 20 November 2021 at 04:58:52 UTC, Walter Bright wrote:

betterC needs official support library, otherwise it is walking on one foot.

« First   ‹ Prev
1 2 3