4 ms·
I disagree. If all you have is switches on the front panel, symbolic assembler isn't really much help. You just memorize that 0101 0000 0001 = register move fro
by jfoutz 10y ago
I disagree. If all you have is switches on the front panel, symbolic assembler isn't really much help. You just memorize that 0101 0000 0001 = register move from r0 to r1. It may take a week or a year, but eventually you sling that binary like it's nothing. I suspect the same is true of punch cards.
I built a computer with TTLs back in the early 90's whopping 256 bits of ram. but it was programmed with switches. it really doesn't take that long to memorize the states. To be fair, i never had to toggle switches for work. there might be other factors i'm neglecting.
The problem is like Carmack said, errors are depressingly statistical. you'll inevitably fat finger one of those switches, and everything sucks.
Now, if i have a terminal, and can type the program into a file, things are a little different. but mostly, i just don't want to wear out the 0 and 1 keys. with a 4 bit encoding, i don't think there's really that much win with mov vs 0f. with a 5 bit encoding i'd have 32 keys to play with, and could probably type my intentions very quickly, with some practice. heck, you can sling bf pretty quick if you spend a week encoding something hard. The big thing is variable names are chosen for you - instead of 'money' you have 0x0128 or whatever.
A symbolic assembler buys you variable names. That's a pretty big win when you get more than, say 100 variables and functions. Small programs, no biggie, you can keep it in your head. Things get bigger it gets tough to memorize everything. So clearly the benefit grows as programs get larger. But i'd be skeptical of even 30% on front panel switches. In an editor? If i can use emacs, i can probably set up syntax highlighting for instructions and arguments. Play some goofy game with variable names in comments an have emacs auto manage synching the comment and memory address. so i'm not sure it would be a huge win then.
The big wins (for me) with C are total insulation from register <-> memory moves and stack discipline. this is a WAY bigger deal than binary vs symbolic. you can call any function you want without having to remember what registers this function will stomp. But i've never tried to toggle in C on switches. I can say, i get more done in C than assembler, but that's not claiming a whole lot.
C++ vs java? Well, valgrind helped me a lot with c++. java means never running valgrind. That's not to say, i haven't had my share of NPE's in java. Java just tells you where it happened rather than crashing.
Once you know what you want to say, You want to say that concisely, to minimize those statistical errors. IMHO I can be more concise with a higher level language, so those statistical errors don't bite as often. If i have 1 bug per 100 lines of code, i'd rather write in the more concise language. But i have upper limits to concision. APL is too hard.