Comment by dahart
6 hours ago
This is cute, and it’s fine and fun to play around, but I don’t know, takes itself way too seriously or something. I apologize for being negative, but blowing my mind? No, not exactly. The attempt at the end to justify isn’t compelling to me and feels pretentious or something; the so-called Sapir-Whorf hypothesis (a misnomer according to the link) is about words and concepts, not about layout. This article fails to consider how to say or to read 2D code, or even think about why text is normally 1D. Language is expressed in one dimension because of time. We don’t speak in 2D, because we can’t, therefore we don’t write in 2D. We do visualize parse trees as trees (2D pictures) all the time, which isn’t mentioned. Also not mentioned are all the massive downsides of trying to write & edit & maintain 2D code, as well as the fact that we have good ways to write 3+ argument functions in 1D.
Nitpick - the andFlip function is wasting a whole dimension with unnecessary lines, and also modifying its input argument unnecessarily (yuck!), and it takes 3 arguments as an array for no good reason.
Better: andFlip = lambda a,b,c : not c if (a and b) else c
Except this is really just a normal 2 argument ternary, it does nothing interesting with a or b individually, it treats them as a unit, so I’d argue this shouldn’t even be a function.
No comments yet
Contribute on Hacker News ↗