dlang website design

Ecstatic Coder via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 24 12:22:48 PDT 2017


On Saturday, 24 June 2017 at 18:10:54 UTC, Adam D. Ruppe wrote:
> On Friday, 23 June 2017 at 18:26:43 UTC, Ecstatic Coder wrote:
>> I'm also in favor that some of your personal developments be 
>> converted into std libs.
>
> Eh, std libs is where you lose me. I don't mind offering a 
> "just works" dmd download on my website, with my packaging dmd 
> for some particular purposes, or on the official site, that 
> includes all the stuff. But I have no interest in being part of 
> Phobos and losing control of my projects.
>
> Now, I think Phobos should be open to those things, where the 
> modules are owned by third parties and just packaged as a 
> standard library. The phobos devs might fork it or whatever, of 
> course, but this would be more like a Linux distribution than a 
> corporate merger - the individual packages in a Linux distro 
> are still owned by outside parties, and the distro maintainers 
> just bring them in and might slightly modify them to fit their 
> thing better.
>
> From the user side, it looks like a traditional std lib, but 
> from the developer side, it is more of a bazaar than a 
> cathedral.

+1 :)

Actually D doesn't need hundreds of additional types and 
functions in the libraries.

Look for instance this Go code :

package main

import (
     "log"
     "net/http"
)

func main() {
     http.HandleFunc("/", func(w http.ResponseWriter, r 
*http.Request) {
         http.ServeFile(w, r, r.URL.Path[1:]);
     });

     log.Fatal(http.ListenAndServe(":80", nil));
}

Two lines of code, that's all that's needed to serve an entire 
website, with all sorts of files (html, css, js, jpg, png, etc) 
located in plenty of directories.

NO framework required. Nada. Just a standard Go installation.

Same for Node.js. It's 100% batteries included...

So having just a few types and functions similar to those of Go 
and Node.js, without requiring to install a complete framework 
like vibe.d for such basic cases would definitely make a HUGE 
difference in terms of IMMEDIATE usability for D.

Go is very popular for web development because most developer can 
already do 99% of their work JUST with the standard libraries.

These few web server functions are generally more than enough to 
quickly build most functionalities with just a few lines of code.

Unfortunately, D lacks these few "standard building blocks".

We can implement the same functionalities in D with a THIRDPARTY 
FRAMEWORK, but not with the few "building blocks" provided by 
standard libraries functions.

Which is very sad, because webserver development is a domain 
where D can be a perfect contender to Go, Java and C#, and not 
everybody is willing to use a full framework just to have the 
same functionalities as these two simple lines of Go code.



More information about the Digitalmars-d mailing list