Join Nostr
2026-04-17 18:07:25 UTC
in reply to

Kirtai 🏳️‍⚧️ on Nostr: Consider things like boilerplate, patterns and conventions. In a language with weak ...

Consider things like boilerplate, patterns and conventions.
In a language with weak or no metaprogramming you just have to write those out every time.
In languages with strong metaprogramming, you can wrap them up, name them and then they're just another part of the language.

e.g. consider opening a file, doing something with it then closing it, using exceptions to ensure that it's always closed no matter what.
In many languages you have to either hope that the language creators provided it or you'll have to write that out yourself every time you do it.
In Common Lisp, you just use the *with-open-file* macro.

The key point is that you can create these things yourself. There is no *with-open-socket* macro in Common Lisp but unlike many languages, you can *make your own*.

You can define your own *with-open-socket* macro and use it in exactly the same way as the built in macros. It becomes part of the language under your control.