On Saturday, 24 June 2017 at 19:22:48 UTC, Ecstatic Coder wrote:
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.

Fun fact: I actually do *not* have code that does that in one line. With my cgi.d, you'd have to roll your own with std.file and the cgi params or something. It isn't hard, but I didn't provide my own function since it is useless to me - serving static files is done brilliantly well by your production web server, so why not just use it?!


Anyway, my point is that anybody can put a few examples in the stdlib and say "look at how easy this is!", but the real question is how easy it is to do something that the example writers didn't think of. That's why I want to promote decentralization - with a lot of people owning their own projects, you are more likely to find what you need.

Just at the same time, you're right that locating, evaluating, and actually using these things is a hassle. (In fact, I find in most languages that libraries are NOT worth the hassle and I avoid using them!)


So that's why the balance I want to get is one where the projects are developed individually, but particularly useful/popular ones are bundled by the central maintainers... or ranked by the lib repo website (code.dlang.org or otherwise) and trivially downloaded on demand. I also want tutorials with a lot of fully working examples available and easily discovered to show how to use these.

We're currently OK at this, but it could be better.

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.

The real WTF is you'd use two lines of Go code when you can just copy your files into /var/www/htdocs and let Apache do it for you.

Reply via email to