Redesign of dlang.org
Bastiaan Veelo via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 7 03:36:58 PST 2016
On Thursday, 7 January 2016 at 10:58:49 UTC, anonymous wrote:
> However, my stance at the moment is that the intro examples
> should just be really short. The message is that you can do
> something useful or cool in just a couple lines of code. That
> means outright rejection of anything longer than, say, 20
> lines, or maybe even just 15.
Understand. But IMO the main objective should be to demonstrate
expressiveness and productivity to newcomers, and therefore it is
crucial that the examples are understandable in its entirety by
every newbie. Someone unfamiliar to D's UFCS and template
instantiation syntax are likely unable to parse these examples in
their heads without explanatory comments. Without the comments
this example reduces to an incomprehensible blob of code without
structure (in the eyes of a first-time visitor, who may not have
a degree in CS) and is likely to repel instead of attract. This
looks pretty frightening if the objective is just to round
floating point numbers (as explained by the only remaining
comment) -- of course we know that this does a lot more, but a
newbie doesn't.
A competition for writing the most concise code does not
necessarily produce the most illustrative introductions into a
language.
Bastiaan.
More information about the Digitalmars-d
mailing list