January 31, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 01/31/2013 08:15 PM, Walter Bright wrote:
> GC isn't designed to 100% deallocate all unused memory. But C programs typically
> are.
As you can probably tell, I have absolutely no clue about the rationale behind these differences or their consequences -- could you enlighten me?
|
January 31, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joseph Rushton Wakeling | On 1/31/2013 11:42 AM, Joseph Rushton Wakeling wrote: > On 01/31/2013 08:15 PM, Walter Bright wrote: >> GC isn't designed to 100% deallocate all unused memory. But C programs typically >> are. > > As you can probably tell, I have absolutely no clue about the rationale behind > these differences or their consequences -- could you enlighten me? It's a large topic for a n.g. posting. May I recommend the classic book on the subject, Garbage Collection by Richard Jones: http://www.amazon.com/exec/obidos/ASIN/0471941484/classicempire (yes, it's an affiliate link) |
February 01, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 01/31/2013 11:54 PM, Walter Bright wrote: > It's a large topic for a n.g. posting. May I recommend the classic book on the > subject, Garbage Collection by Richard Jones: Looks very interesting, thank you. > http://www.amazon.com/exec/obidos/ASIN/0471941484/classicempire > > (yes, it's an affiliate link) Quite right too. :-) |
February 01, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 2013-01-31 23:54, Walter Bright wrote: > It's a large topic for a n.g. posting. May I recommend the classic book > on the subject, Garbage Collection by Richard Jones: > > http://www.amazon.com/exec/obidos/ASIN/0471941484/classicempire This seems to be an update: http://www.amazon.com/The-Garbage-Collection-Handbook-Management/dp/1420082795/ref=pd_bxgy_b_img_y -- /Jacob Carlborg |
February 01, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On 01/30/2013 07:48 PM, H. S. Teoh wrote:
>
> If you're somewhat familiar with the details of the C standard, you'll
> realize that a laughably large percentage of C code currently in use is
> actually invalid C (either due to undefined behaviour, or incorrect
> reliance on sizeof(char)==1, or a whole bunch of other obscure rules
> that most C programmers aren't even aware of).
The C standard defines sizeof(char) to be 1.
By the way, I learned this fact many years ago when reading the book, "C: A Reference Manual", from Harbison and Steele, which I recommend highly for anybody serious about C. It dispelled a lot of mysteries surrounding C for me that were left by other books, and I've used it countless times as a reference.
|
February 03, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paulo Pinto | On Wednesday, 30 January 2013 at 09:01:53 UTC, Paulo Pinto wrote:
> On Tuesday, 29 January 2013 at 21:26:11 UTC, Walter Bright wrote:
>> On 1/29/2013 1:15 PM, David Nadlinger wrote:
>>> On Tuesday, 29 January 2013 at 19:21:34 UTC, Walter Bright wrote:
>>>> One real issue is order of evaluation bugs, but I didn't see a note about that
>>>> in the Clang list.
>>>
>>> Why would you need runtime checking for that?
>>
>> I didn't say you did!
>>
>>
>>> Besides the AddressSanatizer and MemorySanatizer features which are obviously
>>> real-world oriented (cf. Valgrind), I also find quite a few of the ubsan
>>> features to be actually useful in practice - integer overflow detection is only
>>> a small part of it.
>>
>> valgrind is immensely useful for C, but a lot less so for D as D guarantees initialization and a GC takes care of much of the rest.
>
> Many have jokes about Java being a language that requires an IDE to be usable.
>
> Usually I joke that C is a language for tool vendors. How many vendors can take their business to C undefined behaviors and pointer abuse.
>
> No one on their senses does use C today without an endless list of tools that validate their code is not going to explode.
>
> --
> Paulo
My wishlist for a real revision of C would be:
- removes anachronisms like those discussed in this thread,
- add slightly better safety in the use of const (like in C++),
- add C++ style referencess,
- and finally add alternative to includes and the preprocessor by the use of modules.
And nothing more.
Oh, and provide a better/safer standard library:
- add {sz, char *} strings to null terminated strings,
- add standard structures like vectors, linked list, hashmap, etc,
- add abstractions for multithreading
Such a revised C could be backward compatible with standard C (with the restriction of said anachronisms) and show exactly the same performance characteristics, while being much more clean.
AFAIK, there exists at least one attempt at a compiler which replaces includes by modules.
|
February 03, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to SomeDude | On 2/3/2013 12:32 AM, SomeDude wrote:
> My wishlist for a real revision of C would be [...] And nothing more.
I've been seeing those wish lists for 25 years now. The trouble is, everyone has a very different list!
|
February 03, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Am 03.02.2013 12:10, schrieb Walter Bright:
> On 2/3/2013 12:32 AM, SomeDude wrote:
>> My wishlist for a real revision of C would be [...] And nothing more.
>
> I've been seeing those wish lists for 25 years now. The trouble is,
> everyone has a very different list!
Funny thing is that if we ignore the syntax issues, Turbo Pascal, Modula-2 and Ada had most of those features back in the 80's.
What made me eventually move into C++ and only use C level features when required, was the language ability to follow the Pascal family strong typing when one does proper use of high level abstractions the language offers.
However C++'s lack of feature scope like D's safe/system/trusted, means
without tools is not possible to guarantee a safe code base given the language complexity.
--
Paulo
|
February 03, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 3 February 2013 at 11:11:15 UTC, Walter Bright wrote:
> On 2/3/2013 12:32 AM, SomeDude wrote:
>> My wishlist for a real revision of C would be [...] And nothing more.
>
> I've been seeing those wish lists for 25 years now. The trouble is, everyone has a very different list!
And yet C is probably the non obscure language that has evolved the least within these 25 years. Which is all the more astonishing that none of the features in my wishlist is particularly difficult to implement, none of them breaks compatibility with the past, and none of them makes it hard to port to exotic architectures. The last C standard has been particularly disappointing in this regard, as next to nothing that really matters has changed.
It seems to me that the C experts crowd is the most conservative crowd you can find, and one that loves to impose its own masochism to the rest of the world.
|
February 03, 2013 Re: IOC is inside Clang-head | ||||
---|---|---|---|---|
| ||||
Posted in reply to SomeDude | Am 03.02.2013 13:53, schrieb SomeDude:
> On Sunday, 3 February 2013 at 11:11:15 UTC, Walter Bright wrote:
>> On 2/3/2013 12:32 AM, SomeDude wrote:
> [...]
> It seems to me that the C experts crowd is the most conservative crowd
> you can find, and one that loves to impose its own masochism to the rest
> of the world.
+1 :)
|
Copyright © 1999-2021 by the D Language Foundation