I love how this is upvoted to 33 and no comments. It's okay to just shut up and admire sometimes.<p>Good for you for getting that, HackerNews. Except for me.<p>Why isn't the example like this, to show that the notation nests? Or else state clearly that it does not:<p><pre><code> (define (same? a b)
#2dcond
╔═════════════╦══════════════════════════════════════════════════════╦═════════════╗
║ ║ (pair? a) ║ (number? a) ║
╠═════════════╬══════════════════════════════════════════════════════╬═════════════╣
║ ║ #2dcond ║ ║
║ ║ ╔════════════════════════╦════════════════════════╗ ║ ║
║ (pair? b) ║ ║ ║ (same (car a) (car b)) ║ ║ #f ║
║ ║ ╠════════════════════════╬════════════════════════╣ ║ ║
║ ║ ║ (same (cdr a) (cdr b)) ║ #t ║ ║ ║
║ ║ ╚════════════════════════╩════════════════════════╝ ║ ║
╠═════════════╬══════════════════════════════════════════════════════╬═════════════╣
║ (number? b) ║ #f ║ (= a b) ║
╚═════════════╩══════════════════════════════════════════════════════╩═════════════╝)
</code></pre>
Also, the empty cell in the upper left of #2dcond could be used for specifying the default value, overriding the #f default default.
2D languages are an under-researched area of SW dev, IMHO, But I applaud this effort.<p>On the one hand, they can significantly reduce the cognitive effort expressing and understanding code with complex relationships, OTOH they're a bit of a nightmare to actually use, especially the ones that use some form of ASCII art.<p>I wrote a parser for a simple petri net flow diagram that used ASCII art that constructed the state machine between function calls. It worked well until I actually tried to do anything serious with it. The effort required to keep the chart looking tidy quickly outweighs the effort writing a normal pure-code form.<p>IMO, a more "Pythonic", indentation-based diagram may be better but I think you're restricted then in the types of problems you can express.<p>As I say, this all needs more research.
Racket and Scheme are full of these things that appear a little unhinged but then you realize that it's all built from a few very simple principles.