4 ms·
This is code. Instructions codified into a machine-readable format. It's just really verbose and complex code. It reads almost exactly like Polish notation [1],
by andrewstuart2 10y ago
This is code. Instructions codified into a machine-readable format. It's just really verbose and complex code. It reads almost exactly like Polish notation [1], assembly code, an abstract syntax tree. Except encapsulated in JSON trees rather than space-separated lists.
The problem is that it's almost entirely optimized for a machine to read, and not for a human.
Next thing you know, you've written something a little complex in this new format and realized it's pretty hard to maintain. So what should you do? Create a program to generate it, perhaps, from a higher level, easier to read, representation. In other words, a compiler.
[1] https://en.wikipedia.org/wiki/Polish_notation https://en.wikipedia.org/wiki/Polish_notation
- asciimike 10y agoI don't think I ever said it wasn't code, I said it wasn't "backend code". We've exchanged some config (sure, basically an AST) for writing some express/django/rails middleware. I'd much rather check authentication status by writing "{"!=", [request.auth, null]}" than writing more backend code, especially if someone else has done a bunch of the work for me. That said, I'd argue this notation probably isn't a super concise representation for config over code. Implementing a JS evaluator so you could instead write "request.auth != null" and having JS like expressions is easier than the Prefix notation. Cool idea nonetheless!
- deleted 10y ago[deleted]