Why are homepage examples too complicated?

Chris via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 19 03:04:16 PDT 2016


On Wednesday, 19 October 2016 at 09:51:50 UTC, Benjiro wrote:
[snip]

>
> And no offense but basic D is just the same as basic PHP. They 
> are all C languages. If somebody can start in PHP, they can 
> start in D. The big difference is that there is much more 
> materials available for PHP, so people more easily start.
>
> It also helps that you do not need to do a lot of setting 
> things up for PHP ( web hosts ready ). Where as with D, you 
> need to download the compiler, have a root server etc ( if your 
> looking at web programming ).
>
> If you give a novice a D basic hello world or a PHP basic hello 
> world, they can get going with both at the same level. Same 
> with some high level ( basic logic if/else, loops, etc ). That 
> is all the same or so simulare.
>
> But when you trow people into the deep end with pipeline 
> one-liners, templates, mapping etc... sorry but that is way 
> above a lot of people there first experience with a language.

While very basic D is indeed like C, the truth is that you'll 
soon get stuck, if you know nothing about templates.

> You have 3 class of people:
>
> * Total newbies: People who want to see something simple. If i 
> do x, then i get y. Ooooo, shiny. *lol*

They're welcome. But without hard work, they won't get far in any 
language.

> * People with some experience in other languages: They look for 
> similarities, they try to match there logic to the new 
> language. This is actually a big group of potential recruits. A 
> lot of those are actually self-taught programmers.

I agree. But again, without templates and ranges, they won't get 
far. The danger is that you wouldn't want to teach them D the 
wrong way, only for them to find out later that "that's not how 
you do it". Better tell them from the start. Introduce on concept 
at a time.

> * People with large experience: They are advanced programmers. 
> Linking advanced features from one language to another is no 
> issue. They can quickly tell from the summary what the real 
> advantages of a language are. All the programming lingo is no 
> issue for them.
>
> The current homepage example is in my option, right between 
> group 2 and 3. And its disregarding group one and two.

Sure there's nothing wrong with adding one or two "simpler" 
examples. But it shouldn't be just plain C. Have you had a look 
at this page:

https://p0nce.github.io/d-idioms/

Maybe you can find something you like and think it'd be a good 
example.


More information about the Digitalmars-d mailing list