Reddit: why aren't people using D?
Lutger
lutger.blijdestijn at gmail.com
Mon Jul 27 11:31:20 PDT 2009
bearophile wrote:
> Lutger:
>
>>It's interesting why unittest (and assert) are such big success. My idea
>>is that it's not in spite of, but because of their utter simplicity. I
>>speculate that if it would have been different, for example if you would
>>had to create a new file for a unittest, it would not have been used so
>>much.<
>
> It's another example of scaling. A good unit test system is the one that
> allows you to write quickly and in a very simple way simple tests. And to
> use them later to build more and more complex unit testing as the program
> gets bigger. At the moment D unit testing is fit for small purposes only,
> but not for the larger ones (Python docstests are fit for even small
> purposes, you can use it for unit testing even if your program is 15 lines
> long).
Yes, but practically every other language implements testing in libraries.
My suggestion was not build a big unit testing system in the language, but
just to add those one or two changes in order to build such a testing
library on top of the existing system.
...
> Walter Bright:
>
>>It may indeed be the syntax, but consider that no other language adopted
>>those constructs. There was a proposal to add contracts to C++0x which
>>died. I added them to Digital Mars C++ and nobody cared.<
>
> A way to solve this problem is to add features (to D2), and then later
> remove them (to D3) if they aren't appreciated. This breaks backward
> compatibility, as D2 does on D1. Or even (silly idea) adding features to
> D1 may be good to test such features to see if they are worth addign to D2
> :-) Using D1 as experimental field...
>
> -----------------------
>
> Michiel Helvensteijn:
>
>>I don't know a compelling use-case either. But that doesn't mean there
>>isn't any. Nor are there any real dangers. Arbitrarily restricting the
>>possibilities of D doesn't seem like the right way to go.<
>
> Adding random features to a language just because they look cool is a
> terrible thing to do.
>
Isn't this a bit contradictory?
...
>
> Andrei Alexandrescu:
>
>>I think D should also visibly obviate some use of Python or Perl for
>>prototyping.<
>
> A good language works well with others, like Python, it doesn't try to
> fully "obviate" them. But I agree that D may grow some features that allow
> it to "scale down". Syntax support for tuples and list comprehensions are
> two of the things that can help a lot in such regard.
>
list comprehensions are only worth it if you add tuples imho. Otherwise I
think we can get by just fine with map/filter/reduce plus extension methods.
More information about the Digitalmars-d
mailing list