Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Ideal memory management in your dream PL.

Name: Anonymous 2014-10-21 8:06

Imagine you are designing a practical relatively low-level programming language to use instead of C++. What approach to memory management would you use?

In case someone asks, ``what is wrong with manly manual memory management in C++?'', I would briefly explain my disdain towards it. C++ strives to allow for efficient programs to be written, yet you have to jump through hoops and remember 30 different things if you want to avoid inefficiences C++ compilers inject into your application code. Where C would hit the spot with passing of pointers, C++ programmers need to know about RVO and const references and rvalues and perfect forwarding and noexcept declaration of copy constructors (why even have copy constructors anyway‽ how sane is having such thing‽) and reference collapsing rules. All just to prevent compiler from inserting procedures that needlessly copy your data multiple times here and there.

Instead of fixing a conceptually shitty design the committee adds 5 even more shitty things, each with its own semantics, each designed to work around one compiler/stdlib deficiency or another. Each has to be used manually.

So C++ programmers spend their brain cycles on recalling hundreds of shitty techniques while churning out code doing stuff which would be trivial for a saner language compiler to infer, instead of focusing on actual functionality.

Since it is lunch time where I work, I want to fantasize about a language/compiler which has most or all benefits of fast memory management (no GC), takes modern hardware into account, and doesn't fucking get in your way every time you pass a string to a function.

Name: Anonymous 2014-11-17 19:12

>>100
"Those who sacrifice freedom for security deserve neither."
You're right.

Actually, I'm sick to death of the tyranny of the C calling convention, the inability to goto from one function to another, the overhead of reinterpret casts when I need to treat an int as a float, the difficulty of accessing individual bytes in a word when the CPU can do that just fine. I'm sick of address spaces being isolated from each other so I have to jump through hoops to make IPC work. I'm sick of having to go through unoptimized proprietary drivers just to control my hard drive and sound card. I'm sick of making compromises for someone else's putrid worthless tech. The computer industry is a tiramisu of crippled leaky abstractions made of many different layers of bullshit. I deserve better than this.

I am a fucking programmer. I am the creator of thousands of programs. I know what I'm doing. The computer shall do exactly as I tell it and never argue with its god. It is mine to dominate and use. Not Google's. Not Apple's. Not AMD's. Not some fucking patent office. Kiss my ass. Everything they've made is a crime against me, and I'm done with it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List