I may demonize memory unsafe languages a lot

but a proprietary program written in fully dependent types in a memory safe language with many tests and correctness proofs is still worse than a FOSS one in straight x86 asm

@proxeus memory unsafety by default puts a huge burden onto the programmer to maintain memory correctness, which history has repeatedly shown to be too much of a burden, leading to massive amounts of the worst kinds of exploits

@lumi Not necesarily. The problem is that people has a huge tendency of reinventing the wheel when they should be using what is already done and proven safe, even if using memory unsafe code.

Not to mention everything memory-safe is translated later to memory unsafe code anyways. The interpreters and compilers need to be written with memory unsafe languages too.

Memory safeness is good when you are working on a group, for a company or whatever. Other than that there is not really any need to have any kind of abstraction. If you are writting net code stick to what is already done and don't try to reinvent the wheel and you will be fine.

@proxeus I disagree, only in a very limited number of cases is the memory-unsafe code small and simple enough to be audited. memory unsafety brings with it so many landmines, weird cases and unintuitive invariants that it's just not possible to audit the vaaast majority of code in memory-unsafe languages

yes all code eventually compiles down to machine code, but the memory safety checks make sure that this emitted machine code is memory safe

memory safety is just so incredibly hard

@lumi Memory safety also comes at a cost of unoptimized, uneficient code that relies on whatever abstraction layer you use to be as efficient as possible, and the additional complexity of the language.

@proxeus the overhead can be made minimal to inexistent

zero-cost abstractions are a thing that's used a lot in languages like Rust

point taken about complexity, though. still think pros vastly outweigh cons

Sign in to participate in the conversation

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !