View Single Post
Old 12 February 2015, 05:40   #46
Nekoniaow
Banned

 
Join Date: Dec 2014
Location: Montreal
Posts: 129
Quote:
Originally Posted by Thorham View Post
Nonsense. Absolute nonsense.
Re-reading I realized that I should have added "with the same amount of effort/time", without that my sentence is indeed very false. So I thank you for pointing this out.

However you are too harsh to conclude my sentence is nonsensical as I gave enough hints aside from that sentence to let understand that it's not what I meant especially when I add a little bit further "[...] is doable but hard in assembly."

Refactoring in C is an order of magnitude simpler, this makes an enormous difference. I love the 68k assembly language, it's well designed, the instruction set is much more harmonious than its contemporaries and I like using it when needed but the productivity it offers cannot be meaningfully compared to C. Only its efficiency/performance can.

When you refactor in C, you do not have to worry about:
- register re-assignment, re-use, trashing, etc. since you use variables
- data structure modifications: modifying a struct inside a struct inside a struct does not require any code to change, nor offsets to recompute, no indirections to update
- proper typing: variables and pointers are typed, no need to be careful about mistyping (well, less need), the compiler will tell you when you are mistaking an int for a pointer or if you are not using an indirection when one is needed or vice versa
- control flow changes: add conditions to an if/else or an additional embedded branch, change a loop from do/while to for...
- etc.

On a micro scale, these things are all perfectly doable in assembly. On a macro scale, they are terribly hard especially if you have tuned register allocation to minimize ram bandwidth: add a variable and you have to rethink several levels of functions.
This work is worth it on some parts of a program, but on the ones where you need high productivity and lots of rework the use of assembly is a drag. On DM they did an extensive amount of work on the user experience and there are very interesting interviews with Doug Bell where he explains that they iterated an enormous amount of times. Doing it in C rather than assembly gave them an enormous edge, it's undeniable.

Hope that was clearer this time. My apologies again for my original incorrect blanket statement.

Edit: Oh dear, and now I'm pushing us even more into Off topic territory. Sorry!

Last edited by Nekoniaow; 12 February 2015 at 06:06.
Nekoniaow is offline  
 
Page generated in 0.06431 seconds with 9 queries