Earlier quoted context omitted.
IBM has built several operating systems and programming languages and compilers over the years. Probably more than Bell Labs, actually. It's not so surprising.
Unix and C is more known, so that would be my assumption too. In fact I can't name any IBM made OSes or programming languages.
“It is never a compiler error”
271–280 of 280 posts
Re: “It is never a compiler error”
#272Earlier quoted context omitted.
IBM has built several operating systems and programming languages and compilers over the years. Probably more than Bell Labs, actually. It's not so surprising.
Unix and C is more known, so that would be my assumption too. In fact I can't name any IBM made OSes or programming languages.
Re: “It is never a compiler error”
#273Earlier quoted context omitted.
K&R braces have approximately nothing to do with semicolon insertion...
Compare the values of these function bodies: return { }; and return { };
The K&R brace style is not about putting an object literal on the same line with a return statement or on another line, but about how control structures are formatted.
The reason I said that K&R brace style has nothing to do with semicolon insertion is that it’s possible to write all your control structures with K&R braces and still be bitten by the places in the grammar where line breaks are not allowed, like after a return statement, if you’re unaware of it.
It’s also possible to use Allman braces everywhere and never have that problem with return statements.
Re: “It is never a compiler error”
#274Earlier quoted context omitted.
K&R braces have approximately nothing to do with semicolon insertion...
if(foo) if(foo) { Edit: add this comment you have provided approximately nothing in support of your assertion, you can and should do better. I note this thread is JS and a whole lot of this kind of thing going on here I don't usually see elsewhere on HN. It's a shame, discussion is useful to learn things I don't already know. "Nyer, your wrong" not so useful to me, you or anyone else.
I’ve written a ridiculously detailed blog post about automatic semicolon insertion if you want to know all the specifics.
Re: “It is never a compiler error”
#275Earlier quoted context omitted.
I took "clang/llvm may be reckless, but they're fast and have UBsan", to which I replied "gcc is still faster".
Oh, I thought the GP was accusing GCC devs of reckless optimizations. But UBSan is a clang project, so maybe you're interpretation makes more sense. Very confusing thread. :)
Re: “It is never a compiler error”
#276Earlier quoted context omitted.
I definitely found a compiler error in an early version of Julia, luckily the solution was to upgrade to the newer release that I'd been too lazy to bump to.
Good example. "An early version of Julia" is a less-tested piece of your stack than, say, "a recent version of Java". Especially if the feature in question is something absolutely everyone uses in Java.
Re: “It is never a compiler error”
#277Re: “It is never a compiler error”
#278Earlier quoted context omitted.
That first one reminded me of the gripe at the top of perl's Configure script https://perl5.git.perl.org/perl.git/blob/HEAD:/Configure#l36 -- "SCO csh still thinks true is false. Write to SCO today and tell them that next year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)" which only gets printed if the shell it's running in egregiously mishandles &&...
I think someone did a rm -f on SCO, so the problem is solved.
Re: “It is never a compiler error”
#279Earlier quoted context omitted.
You can avoid the second pass...
No, you can't, because at the end of the first pass you have no way to know that it is in sorted order. Go ahead and try to write the pseudocode for your bubble sort implementation that avoids the second pass.
Re: “It is never a compiler error”
#280You gotta through a lot of those sort of expectations out of the windows when working with js. . . imho
It is silly to kick JavaScript in this example because the bug* is in the library of a custom JavaScript interpreter not a common runtime. * https://github.com/code-dot-org/JS-Interpreter/pull/23