Why is `scope` planned for deprecation?
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Nov 18 09:01:24 PST 2014
On Sunday, 16 November 2014 at 21:54:40 UTC, Walter Bright wrote:
> Besides, C was designed for the PDP-11, which had no such
> instructions.
BTW, this is not entirely correct. It had autoincrement on
registers. This is the example given on Wikipedia:
MOV #MSG,R1
1$: MOVB (R1)+,R0
BEQ DONE
.TTYOUT
BR 1$
.EXIT
MSG: .ASCIZ /Hello, world!/
The full example:
http://en.wikipedia.org/wiki/MACRO-11
So the print loop is 4 instructions (I assume .TTYOUT is a I/O
instruction), with a length you would at least have 5
instructions and use an extra register, as you would have an
additional compare.
(As for concat, that I almost never use. In systems programming
you mostly append to buffers and flush when the buffer is full.
Don't need length for that. Even in javascript and python I avoid
regular concat due to the inefficency of concat versus a buffered
join.)
More information about the Digitalmars-d
mailing list