The power of meta
Submitted by Amarjeet Yadav (@amarjeet000) on Wednesday, 25 December 2019
🌓 Submission Type: Crisp (20 minutes) Status: Confirmed
Programs are read by Humans and run by Machines.
Machines care only about correctness and performance of the program, nothing else. However, to humans, Readability and Reasonability of the programs matter the most, beyond just correctness and performance. Developers are not just consuming programs in parts, but also as a whole within a system. Therefore, code volume, function names, programming language, and every other aspect of the system that we can think of, matters.
Prof. Hal Abelson, who co-authored “Structure and Interpretation of Computer Programs” once said: Programs must be written for people to read, and only incidentally for machines to execute.
Developers are responsible for maintaining and extending systems. In order to do so, programs must be readable and simple to reason about, both in parts and as a whole. Clojure’s
meta capability is a great enabler in achieving the readability and reasonability of programs. Clojure’s
meta is a Clojure
map, exposing all possible ways to be consumed by humans and other programs. This opens up possibilities in the domain of dev-tools, api-docs, rich human-readable annotations, and other creative use-cases. I believe that
meta is one of the most under-used and under-appreciated (by majority) features of Clojure. My talk explores ways in which
meta can help us produce programs that are readable and simple to reason about.
I will briefly cover Meta 101, followed by discussing the following topics in terms of how
meta can empower a developer in each of the areas:
- Compiler hints
- Documentation (Not just docstrings)
- Readability and Reasonability
I am a Clojure developer at Ventur8. I work on language design and implementation, and distributed platforms. At Ventur8, we are building a programming language and its support systems (such as runtime, platforms, and dev-tools), which help developers focus on writing just business logic, and not worry about non-essential aspects such as DevOps.