Hello everyone,
I am playing around with DSFML and drawing some stuff on the
screen. It works like a charm but I got some unexpected behavior
when building a `Particle` class.
My class looks like this:
```d
class Particle : Drawable
{
CircleShape shape = new CircleShape(5);
this(int x,
On Wednesday, 28 April 2021 at 15:09:36 UTC, eXodiquas wrote:
```d
class Particle : Drawable
{
CircleShape shape = new CircleShape(5);
This `new` is actually run at compile time, so every instance of
Particle refers to the same instance of CircleShape (unless you
rebind it).
this.sha
Is it ok to do the following ?
I.e. derive a D-class from a CPP-class.
The compiler did not complained, and it was OK for him.
```
c++ -c MyClass.cpp
ldc2 main.d MyClass.o -L-lstdc++
```
```
extern(C++){
class MyClass {
public:
int num=1;
On Wednesday, 28 April 2021 at 15:35:57 UTC, Adam D. Ruppe wrote:
On Wednesday, 28 April 2021 at 15:09:36 UTC, eXodiquas wrote:
```d
class Particle : Drawable
{
CircleShape shape = new CircleShape(5);
This `new` is actually run at compile time, so every instance
of Particle refers to the sa
PS: I managed to link to phobo's/runtime & wxgtk at the same time.
It goes like this [So someone does not need to re-invent the weel]
```
ldc2 - c test.d
c++ test.o -o test -L/usr/local/lib -lphobos2-ldc -ldruntime-ldc
-Wl,--gc-sections -lexecinfo -lpthread -lm -m64
`wxgtk3u-3.0-config --cxxfla
Following code produces a linker error.
d: error: undefined symbol: wxApp::OnInit()
```
extern(C++)
{class wxApp {
public:
bool OnInit();
//virtual bool Oninit();
}
}
class MYAPP: wxApp {
On Wednesday, 28 April 2021 at 19:46:00 UTC, Alain De Vos wrote:
Following code produces a linker error.
d: error: undefined symbol: wxApp::OnInit()
```
extern(C++)
{class wxApp {
public:
bool OnInit();
//virtual bool
On 4/27/21 11:48 AM, Steven Schveighoffer wrote:
I suspect vibe-core or event core may have some subtle bugs in them that
are not easily repeatable, but often result in half-rendered web pages.
Has anyone else seen this? I recently updated to the latest vibe-core
and vibe to see if the problem
What are the strengths and weaknesses comparing the two languages
?
I can name a strength of dlang is the working binding to tk and
gtk.
On 26.04.21 21:13, WebFreak001 wrote:
On Monday, 26 April 2021 at 18:45:08 UTC, Christian Köstlin wrote:
Does anybody use serve-d with emacs (lsp-mode or eglot)?
I would love to see the configuration!
Kind regards,
Christian
if you configure it yourself, feel free to share the configuration a
On Wednesday, 28 April 2021 at 22:41:03 UTC, Alain De Vos wrote:
What are the strengths and weaknesses comparing the two
languages ?
I can name a strength of dlang is the working binding to tk and
gtk.
Crystal has no installer for Windows
I'd recommend you to use templates with alias parameters but you
mentioned that you need to retain function context(for gotos,
continue, break, etc...)
One thing you could do is mix the ugly mixin solution with the
good one:
```D
//inside the function, so that you can access locals
pragma(inlin
On Thursday, 29 April 2021 at 05:41:45 UTC, Imperatorn wrote:
Crystal has no installer for Windows
Is this a strength or a weakness? (SCNR)
On Wednesday, 28 April 2021 at 22:41:03 UTC, Alain De Vos wrote:
What are the strengths and weaknesses comparing the two
languages ?
I can name a strength of dlang is the working binding to tk and
gtk.
Crystal is Web-only focused.
And Crystal is not popular, even compared to D.
On Wednesday, 28 April 2021 at 19:46:00 UTC, Alain De Vos wrote:
It is rather clear what I want to achieve but virtual functions
give me headache because dlang does not now the word virtual.
It's virtual by default. The opposite is `final`.
15 matches
Mail list logo