Article: Writing Julia style multiple dispatch code in D

data pulverizer via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Aug 24 10:06:23 PDT 2017


On Thursday, 24 August 2017 at 16:41:54 UTC, David Gileadi wrote:
>
> Very interesting!

Thank you

>
> I have a couple suggestions: for newbies like me, it would be 
> nice to include a short explanation of multiple dispatch, and 
> maybe a link to a longer description.

Wikipedia's description of multiple dispatch is pretty good, I'll 
include it and add a short description.

> ... Also it wouldn't hurt to include a short excerpt of how 
> this code would look in Julia, along with the D examples.

I included a link to Julia package as an example but I could add 
a short snippet as illustration.

> Finally, I wonder if Discrete and Continuous couldn't be 
> user-defined attributes.

They could but the code closely models Julia's typing system, but 
UDAs could add good usability to this style of programming as 
well.


More information about the Digitalmars-d-announce mailing list