News for hackers. Stuff that matters.
Re:How to design a replacement for C++ by froydnj on Thursday July 22, 2010 @07:55AM (#1537885)
> C hardcodes assumptions about the stack that prevent certain low level optimizations.

Would you please expand on this? I can't think of any assumptions C makes about the stack that C++ wouldn't make; neither can I think of low-level optimizations that said assumptions prohibit. I'm curious about what you have in mind.

Re:How to design a replacement for C++ by shasta on Thursday July 22, 2010 @08:21AM (#1537919)
I just meant that the role of the stack is hardcoded. In most assemblys you can write to the stack pointer and presto, you're working with a new stack. This is a capability of assembly that C doesn't expose.
Re:How to design a replacement for C++ by stcredzero on Thursday July 22, 2010 @09:29AM (#1538039)
longjmp()?
Re:How to design a replacement for C++ by shasta on Thursday July 22, 2010 @10:18AM (#1538156)
No, that only lets you jump out - not e.g. jump between several suspended computations.
Re:How to design a replacement for C++ by jcl on Thursday July 22, 2010 @01:01PM (#1538744)
It raises a valid issue though: The article's author is operating under the assumption that any replacement language must be totally interoperable with C -- both calling and being called. If you have some crazy stack-reassignment logic in a new language, it will break a native C function's ability to longjmp out of a calling function written in the new language.
Re:How to design a replacement for C++ by froydnj on Thursday July 22, 2010 @03:32PM (#1539286)
Sure you can. This is how user-level threading packages work if you don't have kernel support.
Re:How to design a replacement for C++ by shasta on Thursday July 22, 2010 @05:48PM (#1539639)
Interesting, it seems many C implementations do support this. It's not standard C, though.