3 ms·
You do realize that if "they" took C away from us, then all we would be allowed to use is closed source lock-in oriented ecosystems to the point we wouldn't eve
by ctstover 11y ago
You do realize that if "they" took C away from us, then all we would be allowed to use is closed source lock-in oriented ecosystems to the point we wouldn't even be able to trust the very language itself. That's always been the dream, trusted computing all the way from boot to .NET (or similar). You can not in the same breath call for secure computing and spread propaganda against C. (I know it's too much of a leap for most, but it's the same non sequitur as being against government's tight grip on society and for gun control at the same time.)
- eru 11y agoI don't get it. What's wrong with using something like Haskell or Rust? The security there is in the type system at compile time, no Trusted Computing shenanigans, and you still avoid buffer overflows and SQL injections (if you use them properly). Even something as lowly as Python mostly protects you from buffer overflows.
- ctstover 11y agoRegardless of the language, if it had a closed source runtime interpreter and/or VM that you forbade you from performing various sequences of operations on hardware that you "own", actively fought against you seeing what it was doing, etc - then you would no more be able to "trust" it than back-doored cryptography. (I'm getting sleeping, so that may sound wrong. Though it's been a popular troll/advocacy touch point since at least the mid 90s, so there should be plenty of resources out there if your are more curious. ie FSF for starters.)
- DannoHung 11y agoThat is not what either Rust or Haskell are. It would behoove you to have a passing familiarity with what someone says before responding to them combatively
- eru 11y agoThanks! > That is not what either Rust or Haskell are. Nor even Python.
- eru 11y agoI assume you are sleepy. What I am talking about is that some languages make writing safe code easier, that is code that behaves well as a program when compiled to machine language (or interpreted as is). Especially in the face of hostile inputs. As an example, it is pretty hard to make your Python interpreter crash with a segfault using just pure Python code. (It is, of course, easy to generate a Python exception.) Even though, this safety doesn't come at the expense of power: it is easy to tell the interpreter to get out of the way and let you muck around with raw bytes (ie by calling into C). In the case of Python, the safety-by-default comes at the expense of performance. In the case of Haskell, it is either performance or program complexity. (Ie you can write fast Haskell code, but it looks weird.) If you do call into something low level, it will be clearly visibly in your code that something potentially dangerous is going on. Safe and correct behaviour by default is good. Profiling can help you find the few spots where you want to take over safety obligations from the automatic systems in return for extra performance.
- threatofrain 11y agoYou're saying that the only replacement at the level of C would be an opaque proprietary solution, but I'm not sure why that would be true. I'm personally rooting for Rust.
- VeilEm 11y agoHow could anyone take C away from you anyway? You can build your own C. You can build your own hardware to run your own C compiler on.
- ctstover 11y agoFair. Although you could imagine a world where things like the original .Net trusted computing initiative succeeded in full force, and you could not purchase general purpose PC that let you execute any unmanaged code. Just look at the phone market, you can execute C code technically sure - but in unprivileged user space - with hardware you "own". (yes I know about rooting, but this is rhetoric about a hypothetical)
- javajosh 11y agoComputers are great at brain augmentation devices - but if you spend all your time building the device, then you'll get a poor outcome and have wasted (most of) your life. That's the practical reason we want both mass produced hardware and transparent (and hence, controllable) hardware state. A world of augmented minds is much more problematic when a central authority can and does monitor everyone's mind, not the least of which because in such a state revolution would be trivial to eliminate even in it's earliest forms. And I believe all thinking humans have learned by now to distrust any system that can perpetuate itself so perfectly, and so indefinitely.