4 ms·
Funnily, D demonstrates why C compatibility is so important: without C compatibility the adoption would be very low.
by tspiteri 14y ago
Funnily, D demonstrates why C compatibility is so important: without C compatibility the adoption would be very low.
- betterunix 14y agoWhich is basically the only thing C has going for it: we have lots of systems written in C, and so C compatibility becomes important for new systems. C itself is not doing anything to make any system better (and C's focus on dangerous low-level operations has created a software ecosystem that is constantly teetering on the edge of oblivion), but nobody is willing to put in the effort needed to get rid of C and move the programming world forward.
- klodolph 14y agoYou're disparaging C for focusing on "dangerous low-level operations", but you should be singing its praises for delivering us from what came before it: truly low-level languages like assembler, dinosaurs like FORTRAN, and tentacled sea-monsters like ALGOL 68. > nobody is willing to put in the effort needed to get rid of C This statement is wrong on multiple levels. 1. People are willing to put in the effort to move beyond C, and it's been happening for four decades. C++, Java, Python, C#, Haskell, Ruby... 2. Getting rid of C for new projects universally is not really desirable. It's still the only thing I would choose for writing the majority of an OS kernel, where dangerous low-level operations are necessary. For the same reason, we will never ditch assembly. 3. Rewriting old C projects in newer languages is often ill-advised. Source code contains the knowledge of those who worked on it, it is used to describe solved problems. Rewriting code means solving those problems over again, relearning the encoded knowledge, and making bugs that were fixed long ago.
- jejones3141 14y agoAlgol 68 is really not that complicated. It goes to a lot of trouble about a few things that didn't turn out to be too important (e.g. the "book model" of I/O), but it is a model of simplicity and elegance in comparison with C++.
- klodolph 14y agoIt sounds like you're damning ALGOL 68 with faint praise. C++ is the exemplar of complexity and ad-hoc features. If you asked me how my blind date went, and I reply, "She smelled better than the inside of a septic tank," I'm sure you would know what's up.
- darkarmani 14y ago> Which is basically the only thing C has going for it...C's focus on dangerous low-level operations has created a software ecosystem that is constantly teetering on the edge of oblivion Wow! How would you propose giving access to low-level operations? Writing in assembly? > but nobody is willing to put in the effort needed to get rid of C and move the programming world forward. So, you want me to write DSP code in Python? How is that going to work?
- betterunix 14y ago"Wow! How would you propose giving access to low-level operations? Writing in assembly?" How about making it possible to get low-level pointers and to do low-level operations, but not force programmers to do such things just to do something as simple as concatenate two strings? "So, you want me to write DSP code in Python? How is that going to work?" Who said anything about Python? There are a lot of other languages out there. There are Lisp systems that will let you access special CPU opcodes, low-level pointers, memory-mapped I/O, etc. There are hard real-time systems written in Ada. Even if you could show that C is the absolutely best-performance language for some particular operation, why would you write an entire system in C? If it were me, I would write the one function in C, and then call it via an FFI in a high level language. Why constrain your ability to express your design for the sake of a single function?