Timeline for Why are shortcuts like x += y considered good practice?
Current License: CC BY-SA 3.0
28 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 9, 2023 at 13:26 | history | edited | J. Mini | Added extra tag. | |
| Jul 9, 2023 at 13:25 | comment | added | J. Mini | You can't have seen this in R. R doesn't have +=. | |
| Jul 19, 2015 at 9:01 | history | edited | Peter Mortensen | CC BY-SA 3.0 | added 78 characters in body |
| May 20, 2015 at 11:15 | comment | added | Pete Kirkham | Most functional programmers will consider this bad practice. | |
| May 20, 2015 at 3:56 | history | protected | CommunityBot | ||
| Feb 12, 2012 at 8:11 | answer | added | Michael Burr | timeline score: 15 | |
| Feb 10, 2012 at 23:54 | comment | added | SLaks | See blogs.msdn.com/b/ericlippert/archive/2011/03/29/… (see also part two) | |
| Feb 10, 2012 at 13:25 | answer | added | flying sheep | timeline score: 1 | |
| Feb 10, 2012 at 1:19 | comment | added | Eric Lippert | @blesh: That small details of how one expresses an addition in source code have an impact on efficiency of the resulting executable code might have been the case in 1970; it certainly is not now. Optimizing compilers are good, and you have bigger worries than a nanosecond here or there. The idea that the += operator was developed "twenty years ago" is obviously false; the late Dennis Richie developed C from 1969 through 1973 at Bell Labs. | |
| Feb 10, 2012 at 0:37 | comment | added | blesh | @EricLippert: Does C# handle this in the same way as the top answer described? Is it actually more efficient CLR-wise to say x += 5 than x = x + 5? Or is it truly just syntactic sugar as you suggest? | |
| Feb 9, 2012 at 19:45 | vote | accept | Fomite | ||
| Feb 9, 2012 at 15:31 | answer | added | James | timeline score: 53 | |
| Feb 9, 2012 at 15:04 | answer | added | Jamie Cox | timeline score: 26 | |
| S Feb 9, 2012 at 14:28 | answer | added | ctrl-alt-delor | timeline score: 1 | |
| S Feb 9, 2012 at 14:28 | history | made wiki | Post Made Community Wiki by ctrl-alt-delor | ||
| Feb 9, 2012 at 13:46 | answer | added | ncmathsadist | timeline score: 5 | |
| Feb 9, 2012 at 13:02 | answer | added | Andrey Rubshtein | timeline score: 6 | |
| Feb 9, 2012 at 11:47 | history | tweeted | twitter.com/#!/StackProgrammer/status/167575249972502528 | ||
| Feb 9, 2012 at 11:25 | answer | added | S.Lott | timeline score: 1 | |
| Feb 9, 2012 at 8:34 | answer | added | Caleb | timeline score: 4 | |
| Feb 9, 2012 at 8:19 | answer | added | Emilio Garavaglia | timeline score: 611 | |
| Feb 9, 2012 at 7:25 | answer | added | back2dos | timeline score: 42 | |
| Feb 9, 2012 at 7:11 | answer | added | Pubby | timeline score: 9 | |
| Feb 9, 2012 at 6:37 | answer | added | tdammers | timeline score: 18 | |
| Feb 9, 2012 at 6:16 | answer | added | Mark Canlas | timeline score: 6 | |
| Feb 9, 2012 at 5:57 | answer | added | Joe | timeline score: 44 | |
| Feb 9, 2012 at 5:48 | answer | added | Eric King | timeline score: 294 | |
| Feb 9, 2012 at 5:31 | history | asked | Fomite | CC BY-SA 3.0 |