Other Software > Developer's Corner
Strangest language feature
Eóin:
Fantastic question (thread?) from over on stack overflow. Plenty of things in there I never knew about. For example:
In JavaScript:
'5' + 3 gives '53'
Whereas
'5' - 3 gives 2-http://stackoverflow.com/questions/1995113/strangest-language-feature
--- End quote ---
From reddit originally
Deozaan:
That was fun to read through.
MilesAhead:
ahk can't be too far behind with this usage:
--- ---If 0 < 1
{
MsgBox, 64, DummyApp Usage, Usage: DummyApp params
ExitApp
}
To anyone coming from another programming language, the If statement should always be true, like "while 1" ... but not so!! :)
Renegade:
I liked this (Algol):
--- Code: C ---int a[3] = { 1, 2, 3 };int i = 1; void f(int j){ int k; k = j; // k = 2 i = 0; k = j; // k = 1 (!?!) } int main(){ f(a[i]);}
At first glance, it looks hosed, but reading through starting at main() it makes perfect sense. My question then is... Sanity? Are you there? :P :D
Thanks for that link! Some very cool stuff in there.
f0dder:
Renegade: ugh, everything is passed by reference?
Navigation
[0] Message Index
[#] Next page
Go to full version