Re: IOC is inside Clang-head

2013-02-09 Thread SomeDude
On Monday, 4 February 2013 at 06:11:49 UTC, Maxim Fomin wrote: On Sunday, 3 February 2013 at 12:53:19 UTC, 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. Good catch.

Re: IOC is inside Clang-head

2013-02-09 Thread SomeDude
On Saturday, 9 February 2013 at 18:47:00 UTC, SomeDude wrote: On Monday, 4 February 2013 at 06:11:49 UTC, Maxim Fomin wrote: On Sunday, 3 February 2013 at 12:53:19 UTC, SomeDude wrote: It seems to me that the C experts crowd is the most conservative crowd you can find, and one that loves to

Re: IOC is inside Clang-head

2013-02-07 Thread Ziad Hatahet
On Mon, Feb 4, 2013 at 9:38 AM, Walter Bright newshou...@digitalmars.comwrote: C++'s use of for template parameters is not forgivable because many people correctly predicted its problems at the time. Does that also apply to Java and C#? :)

Re: IOC is inside Clang-head

2013-02-07 Thread Walter Bright
On 2/7/2013 6:52 PM, Ziad Hatahet wrote: On Mon, Feb 4, 2013 at 9:38 AM, Walter Bright newshou...@digitalmars.com mailto:newshou...@digitalmars.com wrote: C++'s use of for template parameters is not forgivable because many people correctly predicted its problems at the time. Does

Re: IOC is inside Clang-head

2013-02-07 Thread Ziad Hatahet
On Thu, Feb 7, 2013 at 7:33 PM, Walter Bright newshou...@digitalmars.comwrote: I haven't paid attention to those usages, so I don't have anything informed to say about it. So what was it about C++ that made it a bad choice to use for template parameters (honest question). Was it because

Re: IOC is inside Clang-head

2013-02-07 Thread Walter Bright
On 2/7/2013 8:48 PM, Ziad Hatahet wrote: So what was it about C++ that made it a bad choice to use for template parameters (honest question). Was it because it also overloads the and operators? Grammatical ambiguities which require semantic analysis to figure out, such as: a b c 3

Re: IOC is inside Clang-head

2013-02-07 Thread Andrei Alexandrescu
On 2/7/13 10:33 PM, Walter Bright wrote: On 2/7/2013 6:52 PM, Ziad Hatahet wrote: On Mon, Feb 4, 2013 at 9:38 AM, Walter Bright newshou...@digitalmars.com mailto:newshou...@digitalmars.com wrote: C++'s use of for template parameters is not forgivable because many people correctly predicted

Re: IOC is inside Clang-head

2013-02-04 Thread Maxim Fomin
On Monday, 4 February 2013 at 07:50:41 UTC, Walter Bright wrote: On 2/3/2013 10:11 PM, Maxim Fomin wrote: Old C programmers are experts in some fields and do not follow cool and idiotic ideas in programming languages. C's design isn't free of mistakes, either. That's for sure. And time

Re: IOC is inside Clang-head

2013-02-04 Thread Paulo Pinto
On Sunday, 3 February 2013 at 23:41:56 UTC, Ziad Hatahet wrote: On Sun, Feb 3, 2013 at 1:12 PM, Paulo Pinto pj...@progtools.org wrote: One of the few things I like about Windows 8 is that if Microsoft has its way, C will eventually become a second class citizen at least on one major

Re: IOC is inside Clang-head

2013-02-04 Thread Walter Bright
On 2/4/2013 12:10 AM, Maxim Fomin wrote: On Monday, 4 February 2013 at 07:50:41 UTC, Walter Bright wrote: On 2/3/2013 10:11 PM, Maxim Fomin wrote: Old C programmers are experts in some fields and do not follow cool and idiotic ideas in programming languages. C's design isn't free of

Re: IOC is inside Clang-head

2013-02-03 Thread SomeDude
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

Re: IOC is inside Clang-head

2013-02-03 Thread 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!

Re: IOC is inside Clang-head

2013-02-03 Thread Paulo Pinto
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

Re: IOC is inside Clang-head

2013-02-03 Thread SomeDude
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

Re: IOC is inside Clang-head

2013-02-03 Thread Paulo Pinto
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

Re: IOC is inside Clang-head

2013-02-03 Thread Walter Bright
On 2/3/2013 4:53 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. I suspect that what happened is the C people who wanted more have long since moved to other

Re: IOC is inside Clang-head

2013-02-03 Thread Paulo Pinto
Am 03.02.2013 20:42, schrieb Walter Bright: On 2/3/2013 4:53 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. I suspect that what happened is the C people who

Re: IOC is inside Clang-head

2013-02-03 Thread Ziad Hatahet
On Sun, Feb 3, 2013 at 1:12 PM, Paulo Pinto pj...@progtools.org wrote: One of the few things I like about Windows 8 is that if Microsoft has its way, C will eventually become a second class citizen at least on one major platform. I presume you mean to C++? Since when was C a first class

Re: IOC is inside Clang-head

2013-02-03 Thread Maxim Fomin
On Sunday, 3 February 2013 at 12:53:19 UTC, 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. Good catch. But I see slightly different way. Old C programmers are

Re: IOC is inside Clang-head

2013-02-03 Thread Walter Bright
On 2/3/2013 10:11 PM, Maxim Fomin wrote: Old C programmers are experts in some fields and do not follow cool and idiotic ideas in programming languages. C's design isn't free of mistakes, either.

Re: IOC is inside Clang-head

2013-02-01 Thread Jeff Nowakowski
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

Re: IOC is inside Clang-head

2013-01-31 Thread Joseph Rushton Wakeling
On 01/29/2013 10:26 PM, Walter Bright wrote: 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. On the subject of valgrind and D's garbage collection -- when I've run any D program through valgrind's memory

Re: IOC is inside Clang-head

2013-01-31 Thread Walter Bright
On 1/31/2013 7:27 AM, Joseph Rushton Wakeling wrote: On 01/29/2013 10:26 PM, Walter Bright wrote: 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. On the subject of valgrind and D's garbage collection -- when

Re: IOC is inside Clang-head

2013-01-31 Thread Joseph Rushton Wakeling
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?

Re: IOC is inside Clang-head

2013-01-31 Thread Walter Bright
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

Re: IOC is inside Clang-head

2013-01-31 Thread Joseph Rushton Wakeling
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

Re: IOC is inside Clang-head

2013-01-31 Thread Jacob Carlborg
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:

Re: IOC is inside Clang-head

2013-01-30 Thread Paulo Pinto
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

Re: IOC is inside Clang-head

2013-01-30 Thread 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

Re: IOC is inside Clang-head

2013-01-30 Thread Zach the Mystic
On Tuesday, 29 January 2013 at 19:21:34 UTC, Walter Bright wrote: Even worse is all the millions of man-hours wasted in (usually incorrectly) trying to make C code portable to theoretical C compilers that have ints larger than 32 bits, etc., trying to ensure that modern C code will work on a

Re: IOC is inside Clang-head

2013-01-30 Thread H. S. Teoh
On Thu, Jan 31, 2013 at 01:36:06AM +0100, Zach the Mystic wrote: On Tuesday, 29 January 2013 at 19:21:34 UTC, Walter Bright wrote: Even worse is all the millions of man-hours wasted in (usually incorrectly) trying to make C code portable to theoretical C compilers that have ints larger than 32

Re: IOC is inside Clang-head

2013-01-30 Thread Zach the Mystic
On Thursday, 31 January 2013 at 00:50:39 UTC, H. S. Teoh wrote: On Thu, Jan 31, 2013 at 01:36:06AM +0100, Zach the Mystic wrote: On Tuesday, 29 January 2013 at 19:21:34 UTC, Walter Bright wrote: Even worse is all the millions of man-hours wasted in (usually incorrectly) trying to make C code

IOC is inside Clang-head

2013-01-29 Thread bearophile
The quality of a language also comes from its compiler. Clang 3.3 will have this inside: http://embed.cs.utah.edu/ioc/ To use it you have to compile with -fsanitize=integer: http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation It slows down the code, but it's optional,

Re: IOC is inside Clang-head

2013-01-29 Thread David Nadlinger
On Tuesday, 29 January 2013 at 12:26:10 UTC, bearophile wrote: Is is possible to use ioc from LDC2? D language should enjoy all the nice things they keep adding to LLVM, otherwise C++ risks becoming more modern than D. Join LDC development and find it out. ;) On a more serious note, the IOC

Re: IOC is inside Clang-head

2013-01-29 Thread Paulo Pinto
On Tuesday, 29 January 2013 at 12:26:10 UTC, bearophile wrote: The quality of a language also comes from its compiler. Clang 3.3 will have this inside: http://embed.cs.utah.edu/ioc/ To use it you have to compile with -fsanitize=integer:

Re: IOC is inside Clang-head

2013-01-29 Thread Don
On Tuesday, 29 January 2013 at 12:26:10 UTC, bearophile wrote: The quality of a language also comes from its compiler. Clang 3.3 will have this inside: http://embed.cs.utah.edu/ioc/ To use it you have to compile with -fsanitize=integer:

Re: IOC is inside Clang-head

2013-01-29 Thread Thiez
On Tuesday, 29 January 2013 at 14:22:06 UTC, Don wrote: The key phrase is *undefined behaviors*. Remember that C does not require twos-complement arithmetic. D does, so it doesn't have those problems in the first place. It must have been a dozen times by now that you have posted the same

Re: IOC is inside Clang-head

2013-01-29 Thread Andrei Alexandrescu
On 1/29/13 11:05 AM, Thiez wrote: On Tuesday, 29 January 2013 at 14:22:06 UTC, Don wrote: The key phrase is *undefined behaviors*. Remember that C does not require twos-complement arithmetic. D does, so it doesn't have those problems in the first place. It must have been a dozen times by now

Re: IOC is inside Clang-head

2013-01-29 Thread deadalnix
On Tuesday, 29 January 2013 at 16:42:49 UTC, Andrei Alexandrescu wrote: On 1/29/13 11:05 AM, Thiez wrote: On Tuesday, 29 January 2013 at 14:22:06 UTC, Don wrote: The key phrase is *undefined behaviors*. Remember that C does not require twos-complement arithmetic. D does, so it doesn't have

Re: IOC is inside Clang-head

2013-01-29 Thread Walter Bright
On 1/29/2013 8:48 AM, deadalnix wrote: Is that a practical limitation ? All widespread arch I know assembly for are 2 complement, and it seems like something settled now in the field. Or am I unaware of some important stuff ? One's complement machines existed when I was a wee laddie, but I

Re: IOC is inside Clang-head

2013-01-29 Thread Maxim Fomin
On Tuesday, 29 January 2013 at 19:21:34 UTC, Walter Bright wrote: On 1/29/2013 8:48 AM, deadalnix wrote: Is that a practical limitation ? All widespread arch I know assembly for are 2 complement, and it seems like something settled now in the field. Or am I unaware of some important stuff ?

Re: IOC is inside Clang-head

2013-01-29 Thread David Nadlinger
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? Besides the AddressSanatizer and MemorySanatizer features which are obviously

Re: IOC is inside Clang-head

2013-01-29 Thread Walter Bright
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

Re: IOC is inside Clang-head

2013-01-29 Thread David Nadlinger
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

Re: IOC is inside Clang-head

2013-01-29 Thread Walter Bright
On 1/29/2013 2:04 PM, David Nadlinger 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