News for hackers. Stuff that matters.
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by vyodaiken on Monday February 13, 2017 @09:51PM (#13640788)
This is not really correct. The kinds of implementation dependencies usually encountered reflected processor architecture. The C standards committee and compiler community have created a situation in which different levels of "optimization" can change the logical behavior of the code! Truly a ridiculous state of affairs. The standards committee has some mysterious idea I suppose, but the compiler writers who want to do program transformation should work on mathematica or prolog, not C.
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by prodigal_erik on Monday February 13, 2017 @10:41PM (#13640971)
Compiler writers have to use program transformation to do well on benchmarks. Developers who don't prioritize benchmarks probably don't use C, and if they do they really shouldn't, because sacrificing correctness for speed is the only thing C is good for these days.
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by umanwizard on Tuesday February 14, 2017 @12:51AM (#13641492)
Speed isn't the only reason to use C. I often use C not because it's fast, but because C is by far the simplest mainstream programming language. All these UB warts notwithstanding, no language's interface comes as close as C's to a basic, no-frills register machine.
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by red75prime on Tuesday February 14, 2017 @02:02AM (#13641771)
You don't need speed, but you want to write in a language, which is closest to assembly? Hmm. Interesting view on what is simple.
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by umanwizard on Tuesday February 14, 2017 @03:06AM (#13642046)
Maybe we mean different things by the word "simple". What language do you think is simpler than C?
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by adrianN on Tuesday February 14, 2017 @04:35AM (#13642370)
Scheme, ML, Java, Lua...
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by umanwizard on Thursday February 16, 2017 @05:54PM (#13664375)
Yeah, we must have different definitions of simplicity, as I expected.

Just off the top of my head, Java has the following complexities that C lacks: exceptions, garbage collection, class inheritance, generics, and a very large standard library.

What definition of simplicity are you using when you say Java is simpler than C?

Re:I Do Not Know C: Short quiz on undefined behavior (2015) by junk_disposal on Monday February 13, 2017 @11:27PM (#13641143)
In reality, that's why I think that neither Go nor Rust will ever replace C (Maybe C++, Java or Python), because nothing can replace C.

C worked in the 70s, when a naive compiler + asm would work perfectly.

Re:I Do Not Know C: Short quiz on undefined behavior (2015) by Hydraulix989 on Tuesday February 14, 2017 @01:40AM (#13641683)
Why though? At the end of the day, both are pretty C-like.
Re:I Do Not Know C: Short quiz on undefined behavior (2015) by vyodaiken on Tuesday February 14, 2017 @08:56AM (#13643486)
Oh please.