by acqq · 11y ago · 0 comments
https://news.ycombinator.com/item?id=3964475
printf is based on the idea implemented as early as 1956, next year it will be 60 years since!
1956: Fortran I:
PRINT 1, X
1 FORMAT (F10.2)
Fortran was invented by John Backus and there was already a finished compiler in 1956.I/O in the first Fortran, I believe including the FN.M syntax, was implemented by Roy Nutt, also one obvious genius:
http://www.cap-lore.com/stories/Assembler.html
"There were a few pages of description of a new assembler format for the IBM 704 that differed considerably from the NYAP that we were using." (That) "704 assembler, originally called SAP, was written in its own language by Roy Nutt."
If you didn't read it I would recommend you do - it's possibly one of the most interesting and reflective things I've ever read about programming as a profession.
So if you mismatch the types you'll get a compile time error instead of a run time error.
http://www.codeproject.com/Articles/159910/Extremely-Efficie...