Re: Copy Constructor DIP and implementation

2018-09-21 Thread rmc via Digitalmars-d-announce
On Wednesday, 19 September 2018 at 00:05:15 UTC, Jonathan M Davis 
wrote:
On Tuesday, September 18, 2018 10:58:39 AM MDT aliak via 
Digitalmars-d- announce wrote:
This will break compilation of current code that has an 
explicit copy constructor, and the fix is simply to add the 
attribute @implicit.


In that case, why not just use a transitional compiler switch? 
Why force everyone to mark their copy constructors with 
@implicit forever? The whole point of adding the attribute was 
to avoid breaking existing code.


- Jonathan M Davis


What about a command-line switch that just detects copy 
constructors?


LLVM 8 supposedly has a new feature which breaks compatibility 
for casts from float -> int:


Floating-point casts—converting a floating point number to an 
integer by discarding the data after the decimal—has been 
optimized, but in a way that might cause problems for developers 
who rely on undefined behavior around this feature. Clang has a 
new command-line switch to detect this issue.


Could we do copy-constructors in a similar way?


Webassembly TodoMVC

2018-09-21 Thread Sebastiaan Koppe via Digitalmars-d-announce

Hey guys,

Following the D->emscripten->wasm toolchain from CyberShadow and 
Ace17 I created a proof of concept framework for creating single 
page webassembly applications using D's compile time features.


This is a proof of concept to find out what is possible.

At https://skoppe.github.io/d-wasm-todomvc-poc/ you can find a 
working demo and the repo can be found at 
https://github.com/skoppe/d-wasm-todomvc-poc


Here is an example from the readme showing how to use it.

---
struct Button {
  mixin Node!"button";
  @prop innerText = "Click me!";
}
struct App {
  mixin Node!"div";
  @child Button button;
}
mixin Spa!App;
---