C++17 cannot beat D surely
Russel Winder via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 4 02:35:04 PDT 2017
On Sat, 2017-06-03 at 19:12 +0000, Steven Schveighoffer via
Digitalmars-d wrote:
> On Saturday, 3 June 2017 at 17:32:41 UTC, Andrei Alexandrescu
> wrote:
> > On 06/03/2017 01:03 PM, Russel Winder via Digitalmars-d wrote:
> > > Björn Fahller has done compile time sort in C++17 here
> > > http://playfulpr
> > > ogramming.blogspot.co.uk/2017/06/constexpr-quicksort-in-c17.html
> > >
> > > Surely D can do better?
> >
> > There is nothing to do really. Just use standard library sort.
> >
> > void main() {
> > import std.algorithm, std.stdio;
> > enum a = [ 3, 1, 2, 4, 0 ];
> > static auto b = sort(a);
> > writeln(b);
> > }
>
> I'd say this deserves a blog post but it would be too short.
>
> -Steve
a. that was my point in making the original post; and
b. no it isn't, it is the right length.
It would make a great article for Overload.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20170604/a630e72f/attachment-0001.sig>
More information about the Digitalmars-d
mailing list