Sorting in D Blog Post Review Request
WhatMeWorry via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 4 21:46:13 PDT 2017
On Sunday, 4 June 2017 at 08:34:23 UTC, Mike Parker wrote:
> As a result of the ongoing thread, 'C++17 cannot beat D surely'
> [1], I've slapped together a blog post about it all.
>
> A post about CTFE sort in D by itself would be rather short. So
> I also wrote about two points of the confusion (one of which
> was my own) that arose in the thread. I'd like to publish it
> tomorrow (Monday), so I've put the draft in a gist [2] and I'm
> looking to get anyone who's willing to read it and let me know
> here if I've made any errors.
>
> Thanks in advance.
>
> [1]
> http://forum.dlang.org/post/bhdehyzrlfklfkxicpea@forum.dlang.org
> [2]
> https://gist.github.com/mdparker/c674888dea1e0ead0c6a8fd28b0333d3
Just a minor typo: writeln(b); should be // [1, 2, 3]
enum int[] a = [ 3, 1, 2 ];
static b = sort(a);
writeln(b); // [0, 1, 2, 3, 4]
More information about the Digitalmars-d
mailing list