Great Rust tutorial that D could really benefit from.

jmh530 via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 10 16:26:18 PDT 2015


On Friday, 10 July 2015 at 19:43:06 UTC, Marcin Szymczak wrote:
> Hello dear D community.
> While browsing reddit i stumbled upon a very nice tutorial for 
> Rust programming language 
> (http://nbaksalyar.github.io/2015/07/10/writing-chat-in-rust.html). I have to admit that it is very good, providing the reader with a real-life example of language usage, explains the ideology and proper style of programming in said language and most of all, teaches how to write good idiomatic code.
>
> I think that D community could really benefit from creating 
> something similar, a real-life project tutorial, which is able 
> to show off great D capabilities, introduce to idiomatic and 
> proper way of coding and spread the word to the greater 
> audience.

It looks well done. Us D beginners could definitely benefit from 
more tutorials like this illustrating some of the cooler things 
you can do. There were a number of things I don't think I really 
understood until I started looking at the code in std.range and 
std.algorithm.

One cool thing you can do in Rust is return an rvalue from a { } 
scope. The only problem is then things start getting a little 
confusing about when to use a semi-colon or not (I'd prefer just 
re-using return).


More information about the Digitalmars-d mailing list