Need to find materials for new learners about this programming language
bpr
brogoff at gmail.com
Wed Aug 7 00:40:09 UTC 2019
On Tuesday, 6 August 2019 at 18:58:20 UTC, Ali Çehreli wrote:
> On 08/06/2019 10:52 AM, bpr wrote:
> > Cool! One thing I didn't care for reading this that templates
> are
> > introduced via the shorthand for function and struct/class
> templates,
> > rather than introducing the general template mechanism first
> and then
> > showing the shorthand. Templates are one of D's best features
> and I
> > don't think they should be cropped to fit the C++ viewpoint.
>
> I think it comes from my earlier choice of that order. (RazvanN
> and others relied of my format.) I don't remember now exactly
> why but it was usually for trying to minimize forward
> references. The actual syntax appears 14 chapters after the
> shorthand syntax:
>
> http://ddili.org/ders/d.en/templates_more.html
>
> Ali
Oh I didn't realize that, and didn't mean to disparage your book,
which is an outstanding introduction to D aimed at beginning
programmers. I assumed that the page I cited was intended for
people who knew a bit about programming. That said, have you ever
considered introducing it the other way?
The full D template is powerful, and reminds me a bit of the
parameterized modules of ML family languages like OCaml and SML.
More information about the Digitalmars-d
mailing list