Jump to page: 1 212  
Page
Thread overview
OSNews article about C++09 degenerates into C++ vs. D discussion
Nov 19, 2006
Mars
Nov 19, 2006
John Reimer
Nov 19, 2006
BCS
Nov 19, 2006
John Reimer
Nov 22, 2006
Steve Horne
Nov 22, 2006
Kyle Furlong
Nov 22, 2006
John Reimer
Nov 22, 2006
Kyle Furlong
Nov 22, 2006
John Reimer
Nov 22, 2006
Don Clugston
Nov 22, 2006
Bill Baxter
Nov 25, 2006
Steve Horne
Nov 25, 2006
Don Clugston
Nov 22, 2006
Georg Wrede
Nov 22, 2006
Walter Bright
Nov 22, 2006
Walter Bright
Nov 22, 2006
Kyle Furlong
Nov 22, 2006
Sean Kelly
Nov 22, 2006
Walter Bright
Nov 25, 2006
Steve Horne
Nov 25, 2006
John Reimer
Nov 28, 2006
Georg Wrede
Nov 28, 2006
Steve Horne
Nov 22, 2006
Mike Capp
Nov 22, 2006
Kyle Furlong
Nov 22, 2006
Mike Capp
Nov 22, 2006
John Reimer
Nov 22, 2006
Mike Capp
Nov 22, 2006
John Reimer
Nov 23, 2006
Mike Capp
Nov 23, 2006
Sean Kelly
Nov 23, 2006
Bill Baxter
Nov 25, 2006
Steve Horne
Nov 27, 2006
%u
Nov 27, 2006
Alexander Panek
Nov 27, 2006
Alexander Panek
Nov 23, 2006
Georg Wrede
Nov 25, 2006
Steve Horne
Nov 23, 2006
Steve Horne
Nov 22, 2006
Boris Kolar
Nov 23, 2006
Steve Horne
Nov 23, 2006
Steve Horne
Nov 24, 2006
John Reimer
Nov 25, 2006
Steve Horne
Nov 24, 2006
Dave
Nov 25, 2006
Don Clugston
Nov 27, 2006
Benji Smith
Nov 27, 2006
Sean Kelly
Nov 27, 2006
Brad Roberts
Nov 19, 2006
Mike Capp
Nov 20, 2006
Dave
Nov 19, 2006
Georg Wrede
Nov 19, 2006
Mike Capp
Nov 20, 2006
Bill Baxter
Nov 20, 2006
Walter Bright
Nov 20, 2006
Georg Wrede
Nov 20, 2006
Jeff
Nov 23, 2006
Steve Horne
Nov 23, 2006
Steve Horne
Nov 20, 2006
Dave
Nov 20, 2006
John Reimer
Nov 20, 2006
Walter Bright
Nov 20, 2006
Don Clugston
Nov 20, 2006
Walter Bright
Nov 22, 2006
Pierre Rouleau
Nov 22, 2006
Don Clugston
Nov 20, 2006
Miles
Nov 20, 2006
Frits van Bommel
Nov 20, 2006
Miles
Nov 20, 2006
xs0
Nov 23, 2006
Steve Horne
Nov 20, 2006
Frits van Bommel
Nov 24, 2006
Steve Horne
Nov 24, 2006
Frits van Bommel
Nov 24, 2006
Steve Horne
Nov 20, 2006
Benji Smith
Nov 20, 2006
Sean Kelly
Nov 20, 2006
Boris Kolar
Nov 20, 2006
Walter Bright
Nov 20, 2006
Don Clugston
Nov 20, 2006
Bruno Medeiros
Nov 20, 2006
Walter Bright
Nov 21, 2006
Boris Kolar
Nov 21, 2006
Walter Bright
Nov 21, 2006
Boris Kolar
Nov 21, 2006
Walter Bright
Nov 21, 2006
BCS
Nov 22, 2006
Kyle Furlong
Nov 21, 2006
Sean Kelly
Nov 21, 2006
Mike Capp
Nov 21, 2006
Sean Kelly
Nov 22, 2006
David Medlock
Nov 22, 2006
Boris Kolar
Nov 24, 2006
Steve Horne
Nov 20, 2006
Boris Kolar
Nov 20, 2006
Lutger
Nov 20, 2006
Walter Bright
Nov 20, 2006
John Reimer
Nov 20, 2006
Miles
Nov 20, 2006
Walter Bright
Nov 20, 2006
Georg Wrede
Nov 20, 2006
Kyle Furlong
Nov 25, 2006
Steve Horne
Nov 20, 2006
Bill Baxter
Nov 20, 2006
John Reimer
Nov 20, 2006
Kyle Furlong
Nov 20, 2006
Sean Kelly
Nov 20, 2006
Dave
Nov 20, 2006
Sean Kelly
Nov 20, 2006
Sean Kelly
November 19, 2006
http://www.osnews.com/comment.php?news_id=16526
November 19, 2006
On Sun, 19 Nov 2006 12:25:03 -0800, Mars <nospam@null.void> wrote:

> http://www.osnews.com/comment.php?news_id=16526


Degenerates?  :(

-JJR
November 19, 2006
Mars wrote:
> http://www.osnews.com/comment.php?news_id=16526


One issue brought up is that of D "requiring" the use of a GC.
What would it take to prove that wrong by making a full blown standard lib that doesn't use a GC, and in fact doesn't have a GC?

It would be painful to work with but no more so than in C++. OTOH with scope() and such, it might be easy.

Anyway, just a thought.
November 19, 2006
On Sun, 19 Nov 2006 14:59:19 -0800, BCS <BCS@pathilink.com> wrote:

> Mars wrote:
>> http://www.osnews.com/comment.php?news_id=16526
>
>
> One issue brought up is that of D "requiring" the use of a GC.
> What would it take to prove that wrong by making a full blown standard lib that doesn't use a GC, and in fact doesn't have a GC?
>
> It would be painful to work with but no more so than in C++. OTOH with scope() and such, it might be easy.
>
> Anyway, just a thought.


Honestly, first we have to settle on a standard library, which I'm not so sure Phobos is at this point (now that would be a valid criticism from the outside). :P

As for a non-gc based library, it might be a useful experiment; but otherwise, I don't see the motivation for that (other than, I guess, for those very special cases); that said, I wouldn't mind seeing a minimalist one implemented, maybe based off of Ares?

Note, however, that C++ users, many who have grown dependent on manual memory management, are looking for a reason to fault D.  I've actually heard cases where C++ users lambast GC based languages: use of a GC apparently creates "bad programming practices" -- imagine the laziness of not cleaning up after yourself!

People are locked in a whole way of thinking, and you can't really fight it unless they're willing to open up their perspective.

-JJR
November 19, 2006
> One issue brought up is that of D "requiring" the
> use of a GC. What would it take to prove that wrong
> by making a full blown standard lib that doesn't
> use a GC, and in fact doesn't have a GC?
>
> It would be painful to work with but no more so
> than in C++. OTOH with scope() and such, it might
> be easy.

It's not just a library issue, and in some ways I think it *would* be significantly more painful than in C++. D has a lot of innocuous-looking syntax that allocates heap memory non-obviously; AA and dynamic array initialization syntax, for instance. Without a GC, that's a lot of leaks and/or runtime errors waiting to happen.

I don't think it's an impossible sell, though. It would help to have a -nogc compiler switch or syntax attribute that disallowed usage of these constructs. And the scope stuff is coming on nicely; if Walter extends it to support RAII member data, as he's mentioned a few times, it'd be great.

The other big issue mentioned in the article comments is that D's GC implementation is lacking. It's hard to say whether a language with native pointers would really play nice with a copying collector, f'rinstance. Now that Java is GPL it'll be interesting to see whether the JVM's GC implementation can be yanked out for use by other languages: it's generational, copying and pretty well-tuned.

There's some other stuff that's been buzzing around in my head about thread-local heaps lately, but it's not coherent enough to constitute a suggestion yet.
November 19, 2006
BCS wrote:
> Mars wrote:
> 
>> http://www.osnews.com/comment.php?news_id=16526
> 
> One issue brought up is that of D "requiring" the use of a GC.
> What would it take to prove that wrong by making a full blown standard lib that doesn't use a GC, and in fact doesn't have a GC?
> 
> It would be painful to work with but no more so than in C++. OTOH with scope() and such, it might be easy.
> 
> Anyway, just a thought.

Having such a library would make a huge difference in every C++ vs D discussion! The opposition would have a lot less ammunition against us.
November 19, 2006
Georg Wrede wrote:

> Having such a library would make a huge difference
> in every C++ vs D discussion! The opposition would
> have a lot less ammunition against us.

Huh? When did this become an adversarial thing? If you're trying to convince someone that D is a better fit for their needs, labelling them "the opposition" probably isn't going to help.

Bear in mind that a lot of C++ programmers lived through the whole Java hypefest and tend to start twitching when told that GC will magically solve all their problems and they don't need to worry about it. There's a reason why Java's "simple" memory model sprouted PhantomReferences and SoftReferences and WeakReferences a few years down the line: resource lifetime management is a tricksy area with a lot of dark corners, and one size does not fit all. If D is successful it'll sprout similar accommodations in time, though hopefully cleaner ones. Until then, accept that D might not be the right answer for everyone just yet, and the discussion will be less combative and more constructive.

cheers
Mike
November 20, 2006
Mike Capp wrote:
> Georg Wrede wrote:
> 
>> Having such a library would make a huge difference
>> in every C++ vs D discussion! The opposition would
>> have a lot less ammunition against us.
> 
> Huh? When did this become an adversarial thing? If you're trying to convince
> someone that D is a better fit for their needs, labelling them "the opposition"
> probably isn't going to help.
> 
> Bear in mind that a lot of C++ programmers lived through the whole Java hypefest
> and tend to start twitching when told that GC will magically solve all their
> problems and they don't need to worry about it. There's a reason why Java's
> "simple" memory model sprouted PhantomReferences and SoftReferences and
> WeakReferences a few years down the line: resource lifetime management is a
> tricksy area with a lot of dark corners, and one size does not fit all. If D is
> successful it'll sprout similar accommodations in time, though hopefully cleaner
> ones. Until then, accept that D might not be the right answer for everyone just
> yet, and the discussion will be less combative and more constructive.
> 
> cheers
> Mike


Indeed.  The people who really need to be GC-free are a tiny minority. Wasting a lot of manpower creating a non-GC library just people who don't want to convert from C++ will have one less justification for not using D sees like a huge waste of effort to me.

--bb
November 20, 2006
But those things *are* in Phobos.

One could, for example, throw an exception or generate an assert when they are used, at the very least, were they to be disallowed.

Or, those things could be garbage collected, and manual runs could be scheduled for any such.  in any case, the rest of the library could have no gc usage.

It's really any time you get something for nothing, after all.  It's not really that difficult to tell what uses memory, whether it has "new" in it or not - imho.

-[Unknown]


> It's not just a library issue, and in some ways I think it *would* be
> significantly more painful than in C++. D has a lot of innocuous-looking syntax
> that allocates heap memory non-obviously; AA and dynamic array initialization
> syntax, for instance. Without a GC, that's a lot of leaks and/or runtime errors
> waiting to happen.
November 20, 2006
Mars wrote:
> http://www.osnews.com/comment.php?news_id=16526

RE[2]: Not much of an update
> By luzr (2.10) on 2006-11-19 19:44:17 UTC in reply to "RE: Not much of
> an update"
>>I second that. D is a very nice language with a clear focus. My first >>impression was that it has the best of Java, the best of C++ and none >>of they're major weaknesses.
>
>Adds one major weekness - its memory model is based on conservative GC, >which makes it unpredictable and in reality unusable for some important >applications (like cryptography or any other software that deals with >noise-like data).

This is one thing that bothers me with the current GC. If you store data with a lot of entropy in an array (Sound, encrypted data, sensor data, etc...) you start to experience memory leaks because the GC starts to see the data as references to other objects.

Is there a way to tell the garbage collector "don't look for references here" without using malloc and friends?

This would be for a standard sliceable garbage collected array with any kind of data except references. Something like gc.doNotLookForReferences(myArray) would be nice.
« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11