On Tuesday, 27 June 2017 at 01:53:20 UTC, dlangPupil wrote:
On Thursday, 22 June 2017 at 19:19:20 UTC, Ecstatic Coder wrote:
class TOTO
...I think that trying to
make the website very appealing to inexperienced programmers
as well could significantly broaden its user base.
Although I am admittedly an LOB kind of person who cares little
for games or gamification, I do see the benefit of using "fun"
use-case examples, like a tic-tac-toe game, or a soda machine
simulation. Such recognizable zero-overhead/zero-noise
metaphors simplify the tasks of understanding a program and
learning its language.
By contrast, being asked to decipher a mysterious and
unintuitive program like the fatuous tutu example would leave
me resenting the distraction and cognitive overhead. Dammit
Jim, I'm a programmer, not a damned word puzzle competitor!
But that's just me!
So... instead of showcasing just one or another program type on
the website's landing page, why not provide a tabbed dialog or
menu that lets users select the kind of program that most
interests them, e.g., LOB, web, games, STEM, etc. This would
avoid alienating those readers who believe that effective
technical and instructional communication require the
maximization of signal-to-noise ratio ABOVE ALL ELSE.
Some other ideas for introductory illustrative examples for the
website would be to include for each program:
1) A description of the program's function so readers know what
to look for.
2) The expected output.
3) A walk-through, when needed.
4) The same program in other languages, with call-outs to
identify the unique features and benefits of Dlang.
I agree with you.
Let me first say that the tutu code was there just to illustrate
to show which features should be shown in examples. Simple D
features, not complicated ones.
D code is easy to make and read.
That is what people should know about the D language.
I'm in favor of bein able to select an example among a list on
the left side of the screen, and on the right side the example
appears with an explanation below.
The default example is the classic hello word, then we show how
to declare and use integers, strings, arrays, maps, then how to
declare classes, then we have interesting "use-case" examples :
process a text file line by line, using regular expressions,
guess-a-number game, sort lines in alphabetical order, etc.
Kotlin uses a quite similar approach if I remember well.