D popularity

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Jan 21 11:22:19 PST 2013


On Mon, Jan 21, 2013 at 01:47:44PM -0500, Nick Sabalausky wrote:
> On Mon, 21 Jan 2013 13:27:48 -0500
> Nick Sabalausky <SeeWebsiteToContactMe at semitwist.com> wrote:
[...]
> > You should to read Ted Dziuba's "Node.js is Cancer", he explains it
> > better than I can: (He's destroyed all his good older posts, but I
> > managed to save this one from a cache:)
> > https://semitwist.com/mirror/node-js-is-cancer.html
> > 
> 
> Also, FWIW, while most of that sounds like it would also apply to
> Vibe.d, it's drastically mitigated in Vibe.d's case because:
> 
> A. Unlike Node.js, Vibe.d I/O will automatically trigger a fiber switch
> to a different request while the I/O, purely behind the scenes,
> completes asynchronously.
> 
> B. Vibe.d uses a real language instead of requiring your server to be
> written in a toy language that thinks it's ok to force every f*@^ing
> variable in a "scalable" program to be an associative array of
> Variants, whether they need to be or not.
[...]

Yeah, I remember when I was young and foolish, and believed for a short
moment the hype about "dynamic typing" languages. I quickly discovered
that dynamic typing is about the worst plague ever to befall the
programming world as soon as you do anything more than trivial textbook
examples. You have to be constantly vigilant of what types are being
passed around in those variables, because they *might* just happen to be
a string where you expected an int, or an int where you expected an
object! So much code comes crashing down as soon as you hand it a
variable of the wrong type -- which the language explicitly allows you
to, and in fact, which is the language's selling point in the first
place!

So as soon as you move beyond trivial toy programs into real-world
applications, you start feeling the need -- the desperate need -- to vet
each and every single variable passed into your code for their type, and
worse, the exact fields present in an object type, because so much code
depends on variables being, uh, of specific, non-varying types? It's
either that, or constantly checking if something is equal to NULL, or
sorry, I mean, ===NULL (as opposed to ==NULL or =NULL or <>NULL or
====NULL or whatever stupid UFO operator it is nowadays that they use to
patch a type system on top of a broken language). And you quickly find
yourself reimplementing a type system on top of the language, which
*should have provided one in the first place*.

This article cinched it for me:

http://existentialtype.wordpress.com/2011/03/19/dynamic-languages-are-static-languages/

(Summary for the tl;dr people: dynamic languages == static languages
straitjacketed with only a single type.)

To conclude, I have to say that so far, the number of times I've
actually *needed* to use a Variant type in my entire career is 1 (out of
the hundreds if not thousands of programs I've written). And that one
time was when I was writing an interpreter for a DSL. How many
interpreters are written in Javascript? I rest my case. :)


T

-- 
Let's eat some disquits while we format the biskettes.


More information about the Digitalmars-d mailing list