Home Programming writings

Thoughts on Programming Transparency

type of Programming Transparency

Blah blah blah this is a test. People say that languages such as lisp are not transparent, because they obfuscate what is actually going on under the hood.

(define (one-plus-two a b)
  (+ a b))


this would produce this assembly instructions here is where we would show the scheme assembly

Where as this C code, while having a bit more boiler plate, produces much cleaner assembly

int one_plus_two(int a, int b) {
    return a + b;
}

and the subsequent assembly

push    rbp
        mov     rbp, rsp
        mov     DWORD PTR [rbp-4], edi
        mov     DWORD PTR [rbp-8], esi
        mov     edx, DWORD PTR [rbp-4]
        mov     eax, DWORD PTR [rbp-8]
        add     eax, edx
        pop     rbp
        ret

Emacs 29.4 (Org mode 9.6.15)