dmm: (Default)
Dataflow matrix machines (by Anhinga anhinga) ([personal profile] dmm) wrote2021-03-06 11:35 pm

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.

juan_gandhi: (Default)

[personal profile] juan_gandhi 2021-03-07 05:24 am (UTC)(link)

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