The issue with D...

Ecstatic Coder ecstatic.coder at gmail.com
Thu Feb 7 18:18:16 UTC 2019


On Thursday, 7 February 2019 at 11:51:37 UTC, Andre Pany wrote:
> On Thursday, 7 February 2019 at 08:26:50 UTC, Ecstatic Coder 
> wrote:
>> On Tuesday, 5 February 2019 at 10:47:36 UTC, Laurent Tréguier 
>> wrote:
>>> On Monday, 4 February 2019 at 23:28:51 UTC, Ben wrote:
>>>> 1. That is a ... Tatum ... LINUX EXAMPLE, so its already not 
>>>> platform agnostic path.
>>>> 2. You think that running a hashbang example is a good 
>>>> introduction to end users?
>>>> 3. People lean the wrong way and are bypassing the dub 
>>>> package manager
>>>>
>>>> Let me compare to a few languages:
>>>>
>>>> Go: import ( "net/http" ) ...
>>>>
>>>> Ready, set, go ...
>>>>
>>>> Crystal: require "http/server"
>>>>
>>>> Ready, set, go ...
>>>
>>> My 2 cents:
>>> The comparison cith Go holds, but comparing D with Crystal is 
>>> invalid if you are talking about Windows issues; since 
>>> Crystal isn't natively available on Windows.
>>
>> Indeed, but the problem remains.
>>
>> Using D for server and GUI development should appear easy and 
>> natural.
>>
>> The current vibe.d examples isn't conveying that, with all its 
>> "black magic" comments.
>>
>> Contrarily to what D's "leadership" thinks, D has the 
>> potential to become a very good competitor to Go and Crystal 
>> for server development, as both of them are also performant 
>> garbage collected languages.
>>
>> And with dlangui, developing connected desktop application is 
>> a real pleasure.
>>
>> D should be promoted for what it does best, and should how 
>> complex application can be made easily and efficiently with 
>> simple code.
>
> From your post I am not sure whether you know the purpose of 
> the comments in the vibe.d example.
>
> The dub.sdl comment is a dub single package descriptor. You can 
> save the lines to a file example.d and run it with command: dub 
> example.d
>
> With latest dub you can even save the file without the 
> extension .d and if you are on a Linux system you can execute 
> it just with command: ./example. That this the purpose of the 
> shebang line.
>
> I would not describe it as black magic but as very convenient 
> way of calling D coding.
> Vibe.d does here a very good job and just leverage features of 
> posix os and features of the dub package manager.
>
> Kind regards
> Andre

Don't get me wrong.

I'm not saying that including dub commands into D source code 
can't be convenient.

I'm just saying that when you show only one example on the 
landing page of a programming language, it'd better be crystal 
clear.

Or people will see this "complication" as the norm with this 
language.

It's just a matter of public perception.

As you know, I'm personally in favor of showing **THREE** 
**SIMPLE** **USEFUL** examples :

1. how to declare/initialize/process an array and 
read/write/split/replace stuff in a text file
2. how to make a "hello world" http web server
3. how to open a window, enter some text, and say "hello xxx" 
when you push a "hello" button

Simple, easy and concise code.

I'm VERY happy there is a web server example on D's landing page. 
I mean it.

But removing this sort of "garbage" comment, as useful as it is, 
would probably make the example more pleasant to read for people 
evaluating the interest of using D for their next 
personal/professionnal project...



More information about the Digitalmars-d mailing list