4 ms·
You know, some people seem to scoff at replacement Cs. I'm kind of one of them. I know my reason(s) though. It's not about other languages as much as C itself.
by Keyframe 10y ago
You know, some people seem to scoff at replacement Cs. I'm kind of one of them. I know my reason(s) though. It's not about other languages as much as C itself. I've been with it for awful long time now and I used to think I kind of know my way around it. I've changed that line of thinking, because I know it's not true. I make a lot of mistakes, especially considering memory. At least (almost all of) my code isn't public-facing.
Since I thought I knew C very well, I came to realisation (due to many memory bugs/leaks) that maybe that's not the case after all. What is it then? I can get performance out of it, lots of it (that's one thing I know to do, somewhat at least). That's when I questioned myself and started thinking that it's not that I know C (I don't, after 20 years or so), but that I am very comfortable with it and I don't want to change that comfort. C++ and 90's traumas and post 90's (STL) traumas had a lot to do with it. Now, I'm fishing out for newer languages that would replace C for me, Rust namely, but I'm still falling back to C all the time. Now, I'm thinking that that's just the way it is. I'm a C programmer and that's how it will stay. At least for a long while. I do and have used a lot (A LOT) of languages in my past, but my core is always C (also first language I've learned). I don't program anymore for a living (I do "creative stuff" in film and tv now), so that is now more prominent than any other time in the past. I do stuff for me only and I can pick and choose whatever I want to - yet, it's always C.
Sorry for the "rant".
- kazinator 10y agoAll of the things which the C-like replacements for C are competely missing the point. All their goals can be achieved by using a decent high level language (not "C like"), together with using C for just those parts that have to run fast, or interact with the hardware. "Let's make an improved C, and then write millions of codes in nothing but that" is a myopic non-starter.
- kbenson 10y agoHow does this apply towards library creation, where the code is meant to be consumed by other programs languages? While the total lines of code in libraries is less than that in applications, I would say the relative importance is more. That zlib has a fast and correct implementation matters to a lot of people.
- kazinator 10y agoThat's right; one fast and correct zlib matters more than giving everyone an improved C so that they can all try to roll their own zlib that is fast and correct.
- kbenson 10y agoMy comment was mean to point out that even if we magically achieved your dream tomorrow, and almost all applications were written in some HLL (which is probably a good thing), the amount of machine code being run in those applications that was generated from C is still substantial due to library use. If we accept that C is "bad", or at least that some major gains in usability, reasoning and security can be made by changing or replacing it, then there's still a major benefit to doing so. When a bug comes out in zlib (or more likely, OpenSSL again), and we can attribute it to poor engineering in C, it doesn't really matter that all the applications are written in a HLL if they still loaded the library and used it because the performance was needed.
- PeCaN 10y agoThis mirrors my experience. C is a drug man. It's bad but you can't stop. You know how to get shit done in C and it's easy to think in. C is, IMO, something of a local optima for programming. Problem is, it's actually a relatively awful language, and I don't subscribe to the worse-is-better philosophy (though C may well be the best example of it). Thankfully Rust gets my ML instincts going. I'm trying to use it more. It'll be nice not to be anxiously running my test suite under ASAN after every build.
- shrugger 10y agoYeah but after sixty years of C, why should we trust an origanization like Mozilla? They've been thoroughly unwilling to come up with any sort of ANSI standard or anything, despite Rust being a reasonably mature language. Google sought ECMA standardization when they took on Dart. Go language has an official specification, so someone could hypothetically re-implement it if they wanted to, and remain compatible Go projects. Mozilla only wants Mozilla to be involved with Rust. They want everybody to use it in their systems, and have no input on where the language should go.
- vvanders 10y agoReally? The Rust community has been one of the most open and encouraging ones I've seen. They've also taken great pains to make sure that community feedback is solicited and incorporated.
- PeCaN 10y agoHuh? Anyone can submit an RFC: https://github.com/rust-lang/rfcs https://github.com/rust-lang/rfcs While Mozilla may not be the best organization, the Rust team seems much more willing to listen to their users than the Firefox team.
- deleted 10y ago[deleted]
- Guvante 10y agoFrom the little research I have done into Rust it seems unsurprising that there isn't a formal definition as any Rust standard would be similar in value to Haskell 2010. Useful but not sufficient due to the language still evolving.