Why are you using D instead of Rust?
Antonio
antonio at abrevia.net
Sun Oct 24 22:45:11 UTC 2021
On Sunday, 24 October 2021 at 21:18:06 UTC, Ali Çehreli wrote:
> I am glad we can do that but the number of arrays allocated
> there is *I think* 4 per sorted() call. Ouch!
>
>
> D is not Haskell either so let's at least pick a random pivot.
> ;)
>
> Ali
> "Who possibly missed a joke."
Hi Ali,
This is only an example of expressiveness: no one in is right
mind (I don't know if this is how it is said in english) will
include this piece of code as a real sorting code.
But, and this is really interesting, the expression performs
really well compared with other programming languages similar
ones: Python, Julia, Scala, Javascript, Crystal, Nim: no one of
them beats D. https://github.com/ddcovery/expressive_sort
Javascript sorprised me a lot. It is incredibly performant
compared with Python, Julia, Scala... even Nim!!!:
I tried with Rust, but it was impossible to create an
intelligible version.
May be an expression is useless but, at least, it is an
expression :-).
More information about the Digitalmars-d
mailing list