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

I want...

Name: Anonymous 2011-07-09 15:55

A language that:
- Can be compiled to native code.
- Can use OO abstractions.
- Is not Java.
- Is not C++.
- Is not C#.

What I am searching for?

Name: Anonymous 2011-07-14 4:28

>>58
And I think manual memory management is about as silly as manual CPU register management. (Seriously, demonstrate that there is an essential difference, please.)
That's downright silly. Using automatic register allocation does not cause periodic stalling of your program while a 'register collector' is run. A garbage collection pause, on the other hand, can severely impact the user experience, and tweaking it to make it less noticeable has significant impact on the resource consumption of the application. There's a reason why no modern game engine is written in a garbage collected language.

Shared references, as a general technique, is also insanely useful. It's not just that having to keep track of "owners" is tedious, it also limits your design considerably.
Failure. You *should* be tracking the ownership of each object as part of the design of your program. Many objects actually need to have explicit ownership because they need to be cleaned up: file handles, network sockets, sql statements and cursors, etc. It's much better to have a good idea of the ownership of all objects.

I tend to write ad-hoc reference counting and GC pretty regularly while writing C++.
You're doing it wrong. So very, very wrong. The resulting code is likely slower than using a GC; if you're too incompetent to manually manage your memory, then use a GC language for fuck's sake, but don't pretend like this is a good thing. I hope I never have to maintain your code. (For the record, I think shared_ptr<> is cancer and you are cancer for using it. scoped_ptr<> and unique_ptr<>, on the other hand, are wonderful.)

>>65
What are you trying to predict? If you know your machine has 4gb available, predictability isn't important.
Dude, it's not about the total memory usage. A big part of it is being able to control the layout of your memory so you get consistent and predictable cache performance. An equally important part is predicting that you won't get a goddamn GC pause in some innocuous piece of code (and before you say malloc is unpredictable, yeah we know it is, which is why manual memory management allows me to write performance-critical sections without fucking allocating memory.)

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