Macros vs types in functional programming
John De Goes was asked "What's your take on clojure?" John is very famous in the Scala community, he created ZIO, the modern super-performant Scala library for asynchronous and concurrent programming.
He replied:
***
Clojure is a fantastic functional programming language, whose metaprogramming capabilities make short work of many problems solved only with difficulty in statically-typed programming languages.
On the JVM:
- Static types + FP => Scala
- Dynamic types + FP => Clojure
***
One of the selling points of Julia that it has Clojure-strength metaprogramming and multimethods.
What I wonder is whether full-strength Lisp macros and multiple dispatch are really incompatible with static typing, or whether this is a cultural thing.
I tried to Google search for
typed macro
and I see people using macros to express type systems, and people designing actual typed hygienic macros, so I suspect that incompatibility with static type systems might be more of a cultural thing.
He replied:
***
Clojure is a fantastic functional programming language, whose metaprogramming capabilities make short work of many problems solved only with difficulty in statically-typed programming languages.
On the JVM:
- Static types + FP => Scala
- Dynamic types + FP => Clojure
***
One of the selling points of Julia that it has Clojure-strength metaprogramming and multimethods.
What I wonder is whether full-strength Lisp macros and multiple dispatch are really incompatible with static typing, or whether this is a cultural thing.
I tried to Google search for
typed macro
and I see people using macros to express type systems, and people designing actual typed hygienic macros, so I suspect that incompatibility with static type systems might be more of a cultural thing.

no subject
no subject
Да, хорошая тема. Казалось бы, почему нет. Но как-то не складывается в реале.
no subject