Fabulous Adventures In Coding
Eric Lippert is a principal developer on the C# compiler team. Learn more about Eric.
This is definitely one of those questions where knowing what the questioner is really after is necessary before expending any serious effort. Time for another bad analogy!
Is there any documentation that describes all the differences between American Standard English and British Standard English? (“Two countries separated by the same language,” as Shaw said.)
You could scan the American Heritage Dictionary and maybe a few editions of Webster's into a computer, and do a complex textual difference against Chambers and a few other canonical British dictionaries. That would at least give you differences in vocabulary -- we'd learn that those wacky Brits spell "manoeuvre" the fun way, and that "windshield" and "windscreen" are the same thing, and all that rubbish. I mean, garbage.
But that's just vocab. I was in Northern Ireland once visiting a Canadian friend whose roommates howled with laughter when she told them that I "gave her a ride all the way home". Apparently that's some sort of double entendre in Portrush, or maybe they were just weirdoes, I don't know. My point is that the number of subtle differences in meaning is enormous.
And that's just usage! A proper document of the differences between American and British English would also have an analysis of some of the deeper structural and historical factors, and so on. There are many thick books on this subject.
So if some inquisitive soul were to ask one for documentation on the differences between British and American English, it would probably behoove one to find out why they need this information before writing the doctoral dissertation. What if you find out that "I need that documentation because I'm publishing a cookbook written by a British writer. I need to translate it into American Standard English" ? Then that dissertation isn't really going to be that helpful, is it?
Now, of course, those documents only describe differences and similarities in behaviour. If you're interested in differences in implementation and the historical factors which led to those differences, then you're going to need to talk to the language designers who were in the ECMA working group.
And of course, it turned out that the reason the PM was asking in the first place is because a customer had written a script that ran in Netscape, and wanted to know if it would run in IE without changes.
There's an easier way to find out if that script works -- try it and see! If it dies horribly then it probably doesn't work, so fix it and try again. If you're worried about more subtle problems, write a series of unit tests and exercise them on both platforms until you're confident that the whole thing works the way you'd like.
You'd have to do that regardless of whether you had a list of differences, so just do it!
Well, i just read this, and its still relevant today. So well done on writing something that stands up well.
PS English, is not a germanic language its a combination of many languages, Latin, Greek, French, Norsk et all. In fact that's probably the reason for its success as a language, its flexibility.
There is no such thing as American Standard English, or British Standard English, there is just English. But the language accepts and allows barstardisations, such as the Americans and others do to the language.
Finally I would like to congratulate you on spelling "Behaviour" right.
PS. Just remembered that my English teacher, once said that the American adjustments to English were probably done to make the spelling easier. Which was probable due to the "give me your poor etc."
I think I feel the need for a dissertation ;-)
var myString = "0045"
var result = parseInt(myString);
In JScript the result is 37
parseInt in JScript has a second parameter radix, which defaults to 10, but when the string starts with an zero, the parameter defaults to 8 (octal base)