News for hackers. Stuff that matters.
Re:Three lessons I learnt from porting Diablo by ghshephard on Friday December 04, 2009 @05:54AM (#976130)
I'm sorry - I should have been more clear - I _get_ that you inline assembly when you need to do something your Compiler won't let you do (or makes difficult), and that clearly people sometimes will tweak some inline assembly to get a bit more performance - But has anyone ever seen a developer "Struggle with C's casting rules" - and switch to Assembler to over come that challenge? That just seems like an unexpected approach to that problem of understanding a kind of fundamental C concept...
Re:Three lessons I learnt from porting Diablo by gvb on Friday December 04, 2009 @08:45AM (#976305)
No, I've never seen someone drop to assy due to something as simple as not understanding typecasting. Historically it has been for speed (used to be common, a lot less common now) or to do something the compiler/language doesn't support. The anecdote falls into the latter class, but only because the original code author didn't understand C well enough.

When I started programming, the running joke was "you can write FORTRAN in any language, some are just more difficult."

Re:Three lessons I learnt from porting Diablo by wmf on Friday December 04, 2009 @03:25PM (#977115)
One of my coworkers commonly uses pointer math rather than array indexing, so inline asm isn't that much of a stretch. Some C programmers are just thinking in assembly.