On Wednesday, 7 March 2018 at 22:02:17 UTC, sarn wrote:
When I wrote Xanthe a year ago, I rolled my own classes using
alias this and explicit vtables:
https://gitlab.com/sarneaud/xanthe/blob/master/src/game/rigid_body.d#L15
(I did this because normal D classes use the druntime library,
and Xant
On Monday, 2 April 2018 at 07:02:07 UTC, sarn wrote:
I decided to pull some basic background info about vtables,
etc, into its own post. I'll write about taking advantage of
alias this and template metaprogramming in a later post.
https://theartofmachinery.com/2018/04/02/inheritance_and_polymo
On Tuesday, 3 April 2018 at 00:22:52 UTC, Mike Franklin wrote:
I'm curious about this comment in the code:
Unfortunately, "protected" doesn't work, so a lot of members
end up being public. This seems to just be an oversight in
the language, so maybe it will change in future versions of D.
W
On Wednesday, 7 March 2018 at 21:14:12 UTC, Henrik wrote:
Many important libraries like ICU have C
interfaces even when written in C++. The direct support of C
headers would be very convenient in migrating parts of C/C++
projects to D. It would also open up POSIX which is used
extensively i
On Wednesday, 7 March 2018 at 22:02:17 UTC, sarn wrote:
When I wrote Xanthe a year ago, I rolled my own classes using
alias this and explicit vtables:
https://gitlab.com/sarneaud/xanthe/blob/master/src/game/rigid_body.d#L15
(I did this because normal D classes use the druntime library,
and Xan
On Monday, 2 April 2018 at 07:02:07 UTC, sarn wrote:
On Thursday, 8 March 2018 at 22:07:24 UTC, sarn wrote:
On Thursday, 8 March 2018 at 04:37:08 UTC, Mike Franklin wrote:
Nice! I was thinking about something almost exactly like
this recently since 2.079.0 has features to further decouple
the
On Thursday, 8 March 2018 at 22:07:24 UTC, sarn wrote:
On Thursday, 8 March 2018 at 04:37:08 UTC, Mike Franklin wrote:
Nice! I was thinking about something almost exactly like this
recently since 2.079.0 has features to further decouple the
language from the runtime. It would be nice to read
On 8 March 2018 at 14:56, Henrik via Digitalmars-d
wrote:
>
> It all works good, but why do I have to put the @nogc on the constructor and
> destructor separately?
@nogc in the global scope does not propagate inside the class (this
could lead to serious problems).
You can use `@nogc:` at the top
On Thursday, 8 March 2018 at 22:56:27 UTC, Henrik wrote:
why do I have to put the @nogc on the constructor and
destructor separately?
You can make things slightly better by putting @nogc in the
struct itself:
struct S
{
@nogc:
void member1()
{
}
void member2()
{
}
}
But, yea
On Wednesday, 7 March 2018 at 22:02:17 UTC, sarn wrote:
On Wednesday, 7 March 2018 at 12:49:40 UTC, Guillaume Piolat
wrote:
If you know enough D maybe you can implement your own virtual
functions on top of D structs. It seems no one has made it yet.
When I wrote Xanthe a year ago, I rolled my
On Thursday, 8 March 2018 at 04:37:08 UTC, Mike Franklin wrote:
Nice! I was thinking about something almost exactly like this
recently since 2.079.0 has features to further decouple the
language from the runtime. It would be nice to read a blog
post about this technique.
Mike
I didn't rea
On Wednesday, 7 March 2018 at 22:02:17 UTC, sarn wrote:
On Wednesday, 7 March 2018 at 12:49:40 UTC, Guillaume Piolat
wrote:
If you know enough D maybe you can implement your own virtual
functions on top of D structs. It seems no one has made it yet.
When I wrote Xanthe a year ago, I rolled my
On Wednesday, 7 March 2018 at 22:02:17 UTC, sarn wrote:
When I wrote Xanthe a year ago, I rolled my own classes using
alias this and explicit vtables:
https://gitlab.com/sarneaud/xanthe/blob/master/src/game/rigid_body.d#L15
(I did this because normal D classes use the druntime library,
and Xan
On Wed, Mar 07, 2018 at 09:14:12PM +, Henrik via Digitalmars-d wrote:
[...]
> The direct support of C headers would be very convenient in migrating
> parts of C/C++ projects to D. It would also open up POSIX which is
> used extensively in our work.
[...]
There's already core.sys.posix.*, which
On Wednesday, 7 March 2018 at 12:49:40 UTC, Guillaume Piolat
wrote:
If you know enough D maybe you can implement your own virtual
functions on top of D structs. It seems no one has made it yet.
When I wrote Xanthe a year ago, I rolled my own classes using
alias this and explicit vtables:
http
Hi everyone,
thank you all for your great answers. I'm playing around with
@nogc right now, and it looks really promising. Strings and
static arrays all seem to be located on the stack, which is so
much better compared to std::string and std::vector in C++. The
double indirection for virtual
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote:
Does anyone know if D is using the vtable implementation for
virtual functions just like most C++ compilers?
Yes, except without multiple inheritance / virtual inheritance.
If yes, can someone explain the advantages of this strategy? A
f
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote:
I have worked with C in embedded systems for many years now,
and for our modern Linux systems we are using a combination of
C and Java today. Java for parts where memory safety is more
important than speed/determinism, and C for the crit
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote:
Does anyone know if D is using the vtable implementation for
virtual functions just like most C++ compilers? If yes, can
someone explain the advantages of this strategy? A function
pointer in C is regarded as expensive because of missing
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote:
Does anyone know if D is using the vtable implementation for
virtual functions just like most C++ compilers? If yes, can
someone explain the advantages of this strategy? A function
pointer in C is regarded as expensive because of missing
Does anyone know if D is using the vtable implementation for
virtual functions just like most C++ compilers? If yes, can
someone explain the advantages of this strategy? A function
pointer in C is regarded as expensive because of missing
inlining, but a double indirection through a vtable just
21 matches
Mail list logo