5 ms·
The original D compiler was written in C++ and used bits of the C++ compiler (like its optimizer and code generator), and was eventually converted to 100% D. It
by WalterBright 6y ago
The original D compiler was written in C++ and used bits of the C++ compiler (like its optimizer and code generator), and was eventually converted to 100% D. It still kinda looks like C++.
It's like my early Fortran code looked like Basic, my early C code looked like Fortran, my C++ code looked like C, and my D code looked like C++.
It takes a while to write code idiomatic to the language your using.
- johnisgood 6y agoYeah, I had a bumpy transition from C to Forth. Now I can write idiomatic C, Forth, Erlang, OCaml, and Ada/SPARK, but C -> Forth was the most difficult one, I would say. As for C++: I have zero clue about it. Occasionally a student who learns C++ comes to me for help and I end up being useful and help her (by RTFM), but other than that, nothing much really.
- winrid 6y agoOut of the list you gave, when would you chose to use Ada vs the others?
- bitwize 6y agoJust think of Ada as "boomer Rust". It's great for when you have a well-specified project that can be coded in a top-down fashion, and correctness is a paramount concern. It enforces correctness through a very strong type system and a pointer model that forbids aliasing by default (pointers must be declared as 'aliased' to alias them), and the SPARK extensions provide even more guarantees, allowing you to formally specify contracts which the compiler will ensure are fulfilled.
- winrid 6y agoThanks for the explanation. I heard about its type safety, definitely want to try it on some problem at some point.
- MaxBarraclough 6y agoThat's quite a tour of programming languages! Would you mind commenting on what you did with them?
- spaetzleesser 6y agoMy language learning progression is usually to write everything like a mix between C and simple C++, then I start using all kinds of new features and after a while it goes back to simple C/C++ with a few fancy stuff left.
- stephen82 6y agoMan...all I wish, after this illness goes away, is to finally meet you in person (in the near future that is) and have food and drinks while having a geeky chat about programming languages and the like. I like how down to earth human being you are; that's the type of people I want to be around as much as possible. There are so many things I could be taught from you. Keep up the good work mate! +1
- mhh__ 6y agoHopefully the next in-person DConf won't be too far in the future
- WalterBright 6y agoDConf is everyone's chance to throw tomatoes at me!