News for hackers. Stuff that matters.
Re:Bjarne Stroustrup on Dennis Ritchie: They said it couldn'... by acqq on Friday October 14, 2011 @03:05AM (#3110319)
See also:

http://news.ycombinator.com/item?id=1624481

> It's pretty strong evidence that, in 1966, even Niklaus Wirth thought he had to write nonportable code — essentially assembly language with ALGOL syntax — in order to get acceptable performance.

I'd however say that that 1966 code is not at all so far away from C. Today I can also use registers in my big C compiler, heck, I have to for really serious optimization. Just like then. C is also not automatically portable unless active care is done to test it on another platforms and rewrite the parts of it -- if you claim the opposite I have for you some 2 million lines of code I maintain after at least 40 people worked on it -- it's not an exception, more a typical example.

Re:Bjarne Stroustrup on Dennis Ritchie: They said it couldn'... by kragen on Friday October 14, 2011 @01:45PM (#3112136)
Yeah, you're right, PL360 is pretty similar to C, but it failed to achieve what C achieved: providing just enough of an abstraction from the concrete machine to make efficient portable software possible, and in fact even practical.

As far as register optimization in modern C, I think there's a world of difference between saying "register long a, b, c, d, e;" and saying "WHILE W ¬= #1 DO BEGIN R1 := MEM(W); R0 := R1 SHRL 24 SHLL 12 + T; MEM(W) := R0; W := R1 and #FFFFFF; END". But maybe you were talking about inline assembly.

My experience with C portability agrees with yours, although it sounds like yours is deeper.