6 ms·
I love C. Perhaps this is because it's the first language I was taught. It fascinated me. It was complex, it allowed you to do dangerous things, but once it cli
by bitcointicker 11y ago
I love C. Perhaps this is because it's the first language I was taught. It fascinated me. It was complex, it allowed you to do dangerous things, but once it clicks, its like an epiphany :-)
I hardly use it much these days, it's much faster to get things done in python, ruby or perl. Unless you need performance. I guess its like an old song, listening to it brings back memories of what was going on in your life when you first heard it. Reminiscing about writing my first C programs brings back the same kind of memories.
Do other people have the same feeling about the first language they learnt? Or is C really special? :)
- pjmlp 11y agoI was able to discover the power of system programming in higher level languages around 5 years before learning C, so it isn't any special to me.
- FraaJad 11y agocurious... what languages did you use?
- nickpsecurity 11y agoI was going to post his list of system languages that came before C (and were better/safer) but can't find his post. Notable examples, before or after C, are: Burroughs' ALGOL's their safer OS was written in https://en.wikipedia.org/wiki/Burroughs_large_systems#ALGOL https://en.wikipedia.org/wiki/Burroughs_large_systems#ALGOL Modula-2 with its better readability and safety invented in Lilith homebrew system: http://www.cfbsoftware.com/modula2/Lilith.pdf http://www.cfbsoftware.com/modula2/Lilith.pdf Hansen's Concurrent Pascal was concurrency-safe in tiny runtime; Edison was C minimalism on same PDP-11 with cleaner, safer design http://brinch-hansen.net/papers/ http://brinch-hansen.net/papers/ Modula-3 had many C++ advantages, Modula-style safety, and without C's BS: https://en.wikipedia.org/wiki/Modula-3 https://en.wikipedia.org/wiki/Modula-3 Note: SPIN OS was written in it. Supported type-safe compilation and linking of code into running kernel for acceleration. PL/I was one of predominant languages. IBM's mainframe OS's were written in a version of it (PL/S). https://en.wikipedia.org/wiki/PL/I https://en.wikipedia.org/wiki/PL/I Ada was systematically and cleverly designed for safety against most issues. Still is: http://www.adacore.com/knowledge/technical-papers/safe-secure/ http://www.adacore.com/knowledge/technical-papers/safe-secur... Note: Army Secure OS (ASOS), MarteOS, and Muen kernel were written in Ada leveraging its safety properties. That should cover the ones that have been around since the 60's-80's. Doesn't even count functional-oriented languages like Common LISP, Schemes, or Standard ML. LISP had both OS's and CPU's made in it and for it. SML & Ocaml kicked ass in app correctness and compiler writing. Also ignored niche-specific ones like COBOL or Fortran that I thought weren't suitable for a C comparison. Safe, C variants were even made to address its problems: https://www.cs.uic.edu/pub/Main/PhDQualifyingExam/Sample4.pdf https://www.cs.uic.edu/pub/Main/PhDQualifyingExam/Sample4.pd... Note: Cyclone concepts got rolled into Rust. So some benefit there. There's also modern attempts like D, Go, and Rust that try to replace it to various degrees. Wirth's Modula work lives on in Active Oberon System and Go language. Almost all are moving in a direction with ALGOL68's features being the baseline. That there was better stuff before C on 1960's hardware suggests that people should've ditched it or fixed it up a long time ago when hardware limitations weren't holding it back anymore. And let it be known that those are the only reason C was designed how it was. BCPL author actually wanted an ALGOL variant but hardware didn't work well enough. Rest was accidents of history. More detail that stretches further back than OP in this link: http://pastebin.com/UAQaWuWG http://pastebin.com/UAQaWuWG
- ArkyBeagle 11y agoNone of this matters. One (or two) *REALLY big accident(s) of history: The Great Flood of PeeCees came and 'C' was ensconced by Borland and then the use of 'C' in Linux. We waited for Ada, and she showed up decades late.
- nickpsecurity 11y agoPlenty of things on that list are better than C in key ways and pre-date Ada. Plus, many issues with C existed due to hardware limitations. The C community could've been improving the situation gradually by changing the bad features as hardware improved plus importing good things from other languages. Would've required gradual rewrites of what depended on it but would've been worth it. Or merely switching to and integrating better options like Pascal/Modula line with safety & maintenance benefits. Instead, they continued building on the foundation of quicksand with so many systems integrity and availability lost as a result. Lost way, too easily due to developers inability to safety do common things. Things that were safe or easy in alternative languages on 1960's-1980's era hardware. Did I mention this was true in 2015 still on systems with 64 cores? Least Stroustroup made an attempt to bring in advanced features into C. Substantially improved it in resulting quality on average but still showed how much a bad foundation hurts. Stuff like Modula-3 managed high runtime efficiency, compile time efficiency, safety, integration, and readability all at once. So, existence of alternatives providing a better path certainly mattered. That all of it was mostly ignored taught important lessons to future people trying to improve IT. Fortunately, some learned them and now we have better stuff coming along with higher chance of adoption. Plus, significant improvements to existing stuff here and there.
- ArkyBeagle 11y ago"... developers inability to safely do common things." Yep. IMO, the buck stops there.
- nickpsecurity 11y agoAnyone reading CVE's for code in safer languages vs unsafe ones would disagree. The evidence would support them, too.
- ArkyBeagle 11y agoI have no fond memories of Pascal nor BASIC. Once you get to where you think in terms of mechanism and not language, it doesn't matter what you use.