Hacker News new | past | comments | ask | show | jobs | submit login

> So instead of f(x), I have to accept the visual noise and extra characters of (f x)?

(f x) and f(x) have the exact same number of characters; one mans'visual noise' is another's 'visual clarity'




What about (+ (/ 1 2) 5) and 1/2 + 5?

Also if you think parens and prefix notation are so great, would you also like to see math papers written that way?


Now you have to know that 1 / 2+5 is still (1/2) + 5.

The S-exp can be shortened in anything calling itself a Lisp, using the unary reciprocal: (+ (/ 2) 5).

Math papers are full of obscure notations; they should standardize on s-exps. Then just a straightforward dictionary of symbols would be needed to look up a notation.

Math notation is at least 2D: it makes good use of spatial structures to reduce ambiguity. For instance, instead of inventing some crazy ternary operator, mathematicians will just arrange three arguments spatially around a symbol. The space subdivides recursively, so elements end up being positionally determined, somewhat like what S-exps do in 1D.


I can format equations in latex in fewer characters than I could express in Lisp, so what you’re saying about 2D vs 1D really doesn’t make any sense.


LaTeX is (understandably) geared toward single-character variable names, and provides canned control sequences for common functions like \sin \cos. Try it with variable names that are two or more characters, and user-defined functions.


I don't think it's a given that a useful way of expressing programs must also be a useful way of expressing an academic paper.

That being said, a lot of mathematical notation is pretty close to lisp syntax, basically anything that works like sigma.


I see what you mean: Math uses 2D notations with fixed positions. The space around an operator can be subdivided into nine sections (top, bottom, left, right, corners). That yields up to nine positions for operands. Fixed positions means, effectively, no precedence parsing, just like what S-exps do in one dimension. The operands themselves use spatial subdivision likewise. E.g:

      x
           z+w
  y   op   ---
           s+t

this would (op x y (/ (+ z w) (+ s t))).


The fact that lisp syntax introduces no extra characters and no extra noise is my point; I'm glad we agree.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: