Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This makes sense, and I even thought it might be a good idea to think of Assembler (the program) as an interpreter rather than a compiler: each line of code can be seen as a command to emit a piece of machine code, allocate space, change state or mode, etc.


Agreed! Conal Elliott wrote a marvelous post in 02009 describing C as a pure functional DSL whose output is code: http://conal.net/blog/posts/the-c-language-is-purely-functio...


The assembler is not an interpreter because it doesn't produce the output of the program it assembles.

However indeed it's usually called a translator (or, well, an assembler) rather than a compiler, exactly because its algorithms are simpler, and (even if it does things like resolving labels) the way a human looks at the output is as a 1:1 translation of the input.


It produces the output of running the program it assembles under the nonstandard semantics Koshkin is suggesting.

I think assemblers are not called "compilers" purely for historical reasons: they existed for a decade or so before compilers, and initially the "compiler" was more like what we would call a linker (thus the name "compiler").




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: