[Files] New AmigaOne firmware available | ANN.lu |
Posted on 06-Oct-2004 12:44 GMT by Rik Sweeney | 226 comments View flat View list |
A news item on AmigaWorld.net states that Hyperion has released the update of U-Boot to 1.1.1
|
|
List of all comments to this article |
New AmigaOne firmware available : Comment 218 of 226 | ANN.lu |
Posted by Bernie Meyer on 13-Oct-2004 00:03 GMT | In reply to Comment 216 (Gregg): The thing is, no competent C programmer will *think* of it as "assign the sum of x and y to x". What happens here is that the value of x is *incremented* by y.And it's not just that the use of "+=" would immediately signal "increment". The fact that C has predefined operators for increment, decrement, scale and so on means that a competent C programmer will expect any line with a simple "=" assigment operator to do something that can *not* be expressed as an incremet, decrement, scale...Cmoing at it from another way --- "Increment x by y" involves two variables, x and y, and an operation, increment. "x+=y" expresses that. "x=x+y" or worse "x=y+x" involves three variables (two of which happen to be the same, but the reader needs to match those herself), and an operation which is decidedly not "increment".Looking at it yet another way, given two same-integer variables x and y (and where needed a third one z), one *could* write "x^=y; y^=x; x^=y;". Or one could write "z=x; x=y; y=z;". Or one could use "swap(&x,&y);" and have a swap function implemented somewhere else (In C++, using references, one could even have it be "swap(x,y);", and in Perl "($x,$y)=($y,$x);"). All of these do exactly the same thing, and the first version is arguably the fastest and most efficient --- but you would never use it in real code, because the whole connotation of "^=" is "bit operator!", i.e. something that works on individual bits. Yes, it does the right thing in the end, but semantically, it misleads. |
|
List of all comments to this article (continued) |
|
- User Menu
-
- About ANN archives
- The ANN archives is powered by #AmigaZeux. It was updated daily (news last: 22-Oct-2004; comments last: 18-May-2005).
ANN.lu was created, previously owned and maintained by Christian Kemp, www.ckemp.com.
- Contribute
- Not possible at this time!
- Search ANN archives
- Advanced search
- Hosting
- ANN.lu was hosted by Dreamhost. Sign up through this link, mention "ckemp" as referrer and he will get a 10% commission on any account you purchase.
Please show your appreciation for any past, present and future work on ANN.lu by making a contribution via PayPal.
|