The compiler actually crashes rather than returning anything? Well, that's more likely to happen when your code has lots of errors in it. "Don't look at me like that. Go fix your code and then come and complain..."
“It is never a compiler error”
11–20 of 280 posts
Re: “It is never a compiler error”
#12Re: “It is never a compiler error”
#13Obviously things like forward and backward compatibility are much more important in the programming context, so you can't just "fix" things like weird side effects or not throwing an error on assignment in an if statement.
Re: “It is never a compiler error”
#14Re: “It is never a compiler error”
#15You 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
Parent comment makes sense to me as a general comment about getting good at JS. Especially given JS has so many new and exciting libraries that get used in production. Ultimately you must fix your code, JS & libraries aren't likely to change in a timely fashion. And of course what I call a bug in the spec must have been considered a feature at one time, some may still consider it so. That's a question of taste and you can always consider yourself 100% correct on any matter of taste simultaneously with those who disagree. :-)
Re: “It is never a compiler error”
#16You 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
Re: “It is never a compiler error”
#17I'm more shocked that bubble sort is used in production somewhere...
Re: “It is never a compiler error”
#18Re: “It is never a compiler error”
#19I'm more shocked that bubble sort is used in production somewhere...
A common optimization is to use insertion sort for small arrays (less than 64) and quicksort/heapsort/introsort for larger ones. Usually because better algorithms in terms of Big O have worse constant factors.
Re: “It is never a compiler error”
#20Of course, that was pre-1.0 software..