News for hackers. Stuff that matters.
Re:The Next Big Language by huhtenberg on Wednesday January 26, 2011 @04:05PM (#2145131)
I keep thinking that the Next Big Language will be a thing of re-evolution, e.g. someone going back to C and retracing steps of C++ but in a more sensible way.

Also, on a tangential note -- the garbage collection is a huge deal if an adoption of the NBL among C/++ programmers is considered. The only way is to have the garbage collection optional. Similarly to how D has it, but much much simpler. Something like adding new_gc operator (or a malloc_gc function) and to have two kinds of memory blocks - manually managed and garbage collected...

Anyway, it's just a thought from an old fart camp :)

Re:The Next Big Language by brownleej on Thursday January 27, 2011 @12:57AM (#2146775)
That sounds like Objective-C. One of the reasons I first liked working with Objective-C (before the iPhone made it trendy) was that it seemed like a much better-executed version of what C++ was aiming to be. It has optional garbage collection now, but only on the Mac. Its type system is even close to what Steve described in this article.
Re:The Next Big Language by alexgartrell on Wednesday January 26, 2011 @07:06PM (#2145909)
just curious, do you allow malloc_gc'ed items to reference malloc'd ones?
Re:The Next Big Language by huhtenberg on Thursday January 27, 2011 @02:46AM (#2147027)
Sure.

malloc'ed item could be the same as malloc_gc'd, but with its reference count artificially bumped up by 1. free() would decrement the count and the item will be picked up by the GC later on. If there's a provision for an immediate disposal of unreferenced items, then we are back to the standard malloc/free behaviour in case when malloc and malloc_gc items are not mixed.

Re:The Next Big Language by p0nce on Thursday January 27, 2011 @10:50AM (#2148228)
Reference counting is a bad C++ substitute for a real GC.
Re:The Next Big Language by huhtenberg on Thursday January 27, 2011 @11:51AM (#2148493)
Sure, absolutely. Just as C++ is a bad substitute for a real language.

(edit) </sarcasm>

Re:The Next Big Language by p0nce on Thursday January 27, 2011 @10:49AM (#2148219)
The D gc is not more a problem than C++ new is for real-time... RAII is possible and you can avoid allocations, also make custom allocators.