3 ms·
I believe the OP's ergolib provides an example. From https://github.com/rongarret/ergolib/blob/master/core/binding-block.lisp https://github.com/rongarret/ergol
by eliben 4y ago
I believe the OP's ergolib provides an example. From https://github.com/rongarret/ergolib/blob/master/core/binding-block.lisp https://github.com/rongarret/ergolib/blob/master/core/bindin..., the examples show code like:
;;; (bb
;;; x 1
;;; :db (y z) (foo)
;;; :mv (a b c) (bar)
;;; (do-something)
;;; :with open-file f "foo"
;;; (do-something-else))
And the code this replaces. This seems to me hard to understand without first digging into ergolib and grokking what bb means. It's just one simple example.
I forget now where it was, but there's a famous Lisp quote which goes something like (paraphrased from poor memory): in Lisp you don't just solve problem X, you first grow a new programming language designed for solving X-like problems and then simply solve X with that.
This has its charms, for sure. But it makes the code harder to understand for folks not familiar with your "language designed for solving X-like problems"
- vindarel 4y agoIt's a little helper, so as in any language we have to check the doc and an example. Just like how to use a rest api, or a high level function that does a lot of stuff under the hood. Once you know it's a binding macro it's even easy to guess. I don't find it difficult, it is similar to many similar macros out there. so yeah, I don't find the example extraordinary enough to speak about sub-languages. Plus, as another comment said very well, the most important is domain knowledge to understand the code. And the quote is right but we can also use Lisp like a dumb language and get shit done!