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

Programming Language to Replace C++

Name: Anonymous 2010-08-11 21:49

I think we can all agree that C++ is a terrible language. So why is it still around?

When talking to most C++ users (game developers, systems programmers), I've found that most seem to recognize C++'s faults, but they don't really care. They aren't even the slightest bit interested in a new language that might solve its problems, even one that gives them all the power of C++ with none of the downsides. You can't even get them to look at something new.

Why is that? Why does everyone just 'live with it' without wanting to improve the situation?

Name: Anonymous 2010-08-16 1:25

>>49
In any event, analysis can ensure that inserted deallocations, which are exactly equivalent to manual deallocation except that they are automatically inserted, are perfectly safe.
Not in all cases. Maybe in most cases, yes, and it can certainly insert those automatically. But some of them you are going to need to tell it explicitly what their lifetime is. That was my point; manual memory management inherently creates unsafe code because it's *not possible* for the compiler to statically verify that all of your memory deallocations are safe. This is the same as the halting problem. The compiler can't verify it, therefore the compiler can't automatically do it.

As far as the general case goes, annotations don't work either. Where analysis fails, annotations can't inform the compiler or GC very well at all
I suppose I should clarify what I mean by annotations. They aren't "suggestions" to "help" the compiler; they are explicit instructions. FREE THIS HERE. When this variable goes out of scope, free whatever it is pointing to. That's exactly what the "scope" annotation does in D. This is what I am talking about.

As an aside, Go's solution to exceptional cases is a nice try. I don't think they quite got it, but it does get exception handling out of my face.
Give me a break. Go has exceptions. They just don't fucking call them that, because they are trying to avoid the C programmer prejudice against them. Other than that, they are *identical*. defer is merely a convenient syntactic wrapper to a finally block.

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