logoalt Hacker News

tsimionesculast Wednesday at 5:31 PM1 replyview on HN

No, it is not the foundation motivating what other languages give you, not at all.

Programming languages are usually designed based on formal semantics. They include constructs that have been found either through experience or certain formal reasons to be good ways to structure programs.

Haskell's lazy evaluation model, for example, has no relationship to assembly code. It was not in any way designed with thought to how assembly code works, it was designed to have certain desirable theoretical properties like referential transparency.

It's also important to realize that there is no "assembly language". Each processor family has its own specific assembly code with its own particular semantics that may vary wildly from any other processor. Not to mention, there are abstract assembly codes like WebAssembly or JVM bytecode, which often have even more alien semantics.


Replies

mousethatroaredlast Wednesday at 6:05 PM

You don't teach lambda calculus to a first grader.

You don't teach Haskell to seventh grader.

But 4 bit assembly driving a few LEDs? That works