Andrei's list of barriers to D adoption

Yura via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 10 01:29:50 PDT 2016


On Friday, 10 June 2016 at 06:37:08 UTC, ketmar wrote:
> On Friday, 10 June 2016 at 06:25:55 UTC, ketmar wrote:
>> On Thursday, 9 June 2016 at 16:44:23 UTC, Yura wrote:
>>> 4) The C language is well tested and rock solid stable.
>>
>> loooooool.
>
> ah, sorry, let me explain myself. i hit ALOT of gcc bugs in my 
> life. and i never fixed any of them myself, 'cause gcc is very 
> huge, and i don't feel that it worth it. even with bugs that 
> blocked my work i used workarounds and hand-written asm.
>
> i hit some bugs in D too. curiously, it comparable with gcc in 
> numbers (maybe this tells us something, and maybe it is just a 
> coincidence). some of them i was able not only report, but fix. 
> usually, official fix comes later, and was better than mine 
> hacky patch, but hey... DMD compiler is less complex than gcc, 
> *alot* less complex.
>
> now, why i loled: i thinked about what you wrote, and found 
> that gcc bugs blocks my work/pet projects more often than dmd 
> bugs. it may sounds strange, but dmd bug is usually either 
> fixed fast enough (and building new dmd+druntime+phobos from 
> sources takes less than two minutes on my PC), or i know a 
> workaround.
>
> contrary to that, even if gcc bug was fixed fast (and usually 
> they don't), rebuilding gcc takes 20‒30 minutes. and most of 
> the time i can't even understand what fix does, due to huge and 
> unknown codebase.
>
> so no, C languange is not "rock solid stable". it just has alot 
> less features, and if you will use the same feature set in DMD, 
> you will hardly hit a bug too.

Thanks all of you for the constructive discussion, I am a chemist 
studying the programming by myself since I need it to explore 
chemistry at the molecular level and to check my chemical ideas. 
The professional software engineer(SE)/computer scientist(CS) 
would do the job much faster, and the resulting code would look 
much better - but, to do that you need to explain all the 
chemistry behind to SE/CS which would be tricky, and the most 
important (drastic) approximations come exactly from chemistry - 
not from the particular language. I hope you excuse me for the 
long introduction. In my area there are 3 languages dominating: 
Python, Fortran and C/C++. The first is easy (many libraries are 
available), but might be very slow. Fortran is used by the old 
professors, tons of libraries, but is not used outside of 
academia - and this stops young people from studying it because 
everyone at some point may quit an academia. C and C++ perhaps 
dominate the field, but especially the second one is very tough 
for people coming from non-IT background.

I believe D has very high chances to be competitive in this 
field. Regarding the GC, I will try to check it when I have some 
time, but since most of the codes are written in non-GC languages 
(https://en.wikipedia.org/wiki/List_of_quantum_chemistry_and_solid-state_physics_software), something tells me that GC would slow you down because in this field people are fighting for every percent of the performance (many simulations are running for weeks). Another point is to link the libraries, with my poor background in IT, even to link the C library to the C code is a challenge, and something tells me that to link it to D would be even more challenging => to make linking the C libraries as easy as possible (Fortran or C++ libraries are not as important) and to have active support forum when you can as for help in linking the libraries to your D code would be helpful. As people have this support, then they are confident to start their new projects in D. Then, at the conferences/ in the scientific papers people can advertise and promote the language, which is more user friendly than C, Fortran and C++ and is modern enough.
However, perhaps, only enthusiasm is not sufficient for all this, 
you need the sponsors... I agree the C subset for sure guarantees 
(almost) absence of bugs.
Another things where I do almost all my mistakes is: array 
bounding/calling the memory which was free => the result is 
undefined behavior. If I remember correctly the D is better with 
that respect?
Anyway, super easy way to use all C libraries + super active 
support would clearly help to increase D popularity/adoption. All 
other point I raised are perhaps not that important.


More information about the Digitalmars-d mailing list