3 ms·
Homoiconicity is orthogonal to local reasoning. It just means the syntax is represented by the native data format, nested lists. This does make code generation
by so-cal-schemer 2mo ago
Homoiconicity is orthogonal to local reasoning. It just means the syntax is represented by the native data format, nested lists. This does make code generation very straightforward with list processing primitives.
Mutation in scheme is possible, via set!, and set-car! and set-cdr!, but it's not recommended. Functional program design side-steps the issue.
see also:
SICP: 3.1.3 The Costs of Introducing Assignment
https://sarabander.github.io/sicp/html/3_002e1.xhtml#g_t3_002e1_002e3 https://sarabander.github.io/sicp/html/3_002e1.xhtml#g_t3_00...
- chowells 2mo agoYes, I know they're orthogonal. But every example of using macros I see in lisp is either some horrendous non-local logic, or something that can be done better using simpler tools. Where's the killer use case that clearly is good software engineering and not papering over the lack of another feature?
- so-cal-schemer 2mo agoI believe this was built with macros: Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp by taking great ideas from Haskell, Scheme, and OCaml. https://coalton-lang.github.io/ https://coalton-lang.github.io/ Not well known, but surely good software engineering adding features. Lisp* is called the Programmable Programming Language for a reason. pg wrote a treatise on Lisp macros (free download): https://www.paulgraham.com/onlisp.html https://www.paulgraham.com/onlisp.html (add to that something about great power - great responsibility and not holding it wrong)