4 ms·
why use c? its a horrific, logically incongruent lang
by Ih8SF 12y ago
why use c? its a horrific, logically incongruent lang
- flatestcat 12y agoI know what you mean, man. Lots of n00bz, ricers, and fanboiz will claim C is the fastest, most efficent lang because you can get "close to the metal" and "tweak". In reality, any code beyond trivial complexity will benefit much more greatly from algebraic rectification, which can only be done with certain languages that are amenable to formal analysis.
- sfk 12y agohttp://frama-c.com/ http://frama-c.com/
- sirfapsalot 12y agoI think what flatestcat wants is something that actually functions and is proven to function correctly. Frama-C is yet another open source project that is long on hype but woefully short on delivery of actual, working code.
- dang 12y agoReplying to oneself using a bunch of different accounts is an abuse of this site.
- userbinator 12y agoUntil I see an award-winning 4k/64k demo written in one of these ultra-high-level languages, I stand by my opinion that C is more efficient.
- shadowfox 12y ago> In reality, any code beyond trivial complexity will benefit much more greatly from algebraic rectification, which can only be done with certain languages that are amenable to formal analysis What exactly is "algebraic rectification"? While it is generally true that having a formal semantics aids greatly in analysis, it is worth noting that a very large amount of program analysis work is targetted towards C. (And mind you, flexible, high level languages bring with it their own troubles. Analysis in the presence of higher order functions is not a panacea at all)
- jng 12y agoLowest Reasonable Common Denominator
- kzrdude 12y agoMaybe for fun? To learn something?
- ternaryoperator 12y agoIt was 1990. There were not many options. The standard language for technical books then was Pascal. C was a huge improvement over it. In addition, Holub was the C columnist for Dr. Dobb's.
- Dewie 12y agoI won't echo this sentiment, but; why use C for writing a compiler? It seems that languages in the ML family, among others, are nicer for that kind of domain. I guess it at least has its uses if you want your compiler to be really fast.
- kps 12y agoThe book was published in 1990. I worked on a commercial compiler in 1990, and many of our customers ran it under 16-bit MS-DOS.
- cardiffspaceman 12y agoIf you want to have fun exploring how compilers work, in your spare time after a hard day working in C++, what better way than to reimplement a language you know? On the other hand, my projects in this vein are C++ projects but they implement functional languages or Scheme. I have implemented one parser that creates a syntax tree from a simple equational language, and several interpretive backends, such as SKI-combinator-based graph reduction and a TIM-based interpreter. I do care about the speed of the compilers I use for production code, but not for this work. The Scheme compiler I wrote was written to run on my own Scheme interpreter which was written in C++. The reason I think most hobby compilers I know of don't go the way I've gone is that it takes tons and tons of research to find out how functional languages are implemented, and the Appel books are a bit daunting, too.