Docstrings considered too complicated
MRAB
python at mrabarnett.plus.com
Sat Feb 27 21:45:18 EST 2010
Gregory Ewing wrote:
> Mel wrote:
>
>> You could think of it as a not bad use of the design principle "Clear
>> The Simple Stuff Out Of The Way First". Destinations are commonly a
>> lot simpler than sources
>
> That's not usually true in assembly languages, though,
> where the source and destination are both very restricted
> and often about the same complexity.
>
> That's not to say that right-to-left is the wrong way
> to do it in an assembly language, but there are less
> misleading words than "move" that could be used.
>
> Z80 assembly language uses "load", which makes things
> considerably clearer:
>
> LD A, B ; load A with B
>
Some processors distinguish between "load" (memory to register) and
"store" (register to memory), and the destination and LHS operand of
binary operations might be the same register, for example:
CLC ; clear the carry
LDA first ; accumulator := byte at first
ADCA second ; accumulator := accumulator + byte at second + carry
STA result ; byte at third := accumulator
More information about the Python-list
mailing list