Rust vs Dlang
Russel Winder
russel at winder.org.uk
Sat Mar 16 23:57:18 PDT 2013
On Sat, 2013-03-16 at 21:06 -0400, Andrei Alexandrescu wrote:
> On 3/16/13 10:42 AM, Suliman wrote:
> > Hi folks! I had wrote small article about Rust vs D. I hope that you
> > will like it!
> >
> > http://versusit.org/rust-vs-d
>
> Nice writeup. Could you please fix the code formatting? Indentation is
> lost at least on Chrome and Firefox on OSX. Then I'll be glad to post on
> reddit.
Comments such as "There are no threads in D out of the box, but they can
be implemented with the use of language libraries" seems unfair all
round. The D platform is compiler + Phobos so there are threads out of
the box. D also has spawn just as Rust does; out of the box.
Also all the imports for D are missing from the code.
The error handling example is unfair to D, it is not like Go where
return codes are the sole mechanism of error handling, D has exceptions
analogous to Rust.
The switch example maximizes the number of write operations which is
minimizing the "functional approach" that the article appears to be
driving at. So does the switch statement return a value in either
language? If not can maps/dictionaries be used so as to have a single
output statement of a selected string?
--
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: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20130317/d3a52d45/attachment.pgp>
More information about the Digitalmars-d-announce
mailing list