5 ms·
This is pretty neat, but I always find I prefer the simplicity and extensibility of lisp's syntax, despite the difference to math notation. For example, the aut
by assbuttbuttass 5y ago
This is pretty neat, but I always find I prefer the simplicity and extensibility of lisp's syntax, despite the difference to math notation. For example, the author's example of add(add(add(5,6),7),8)... is just (+ 5 6 7 8 ...).
Haskell supports custom infix operators, but you end up having an unreadable soup of <* <$> <$ >>=
- toomanydoubts 5y ago>but you end up having an unreadable soup of <* <$> <$ >>= True to some extent. After learning haskell, I find these operators very readable actually.
- dataangel 5y agoHow do you Google them? As a Haskell newbie this was a big problem for me.
- lalaithion 5y agohttps://hoogle.haskell.org/?hoogle=%3C%24%3E https://hoogle.haskell.org/?hoogle=%3C%24%3E
- bobbylarrybobby 5y agoOften, by type signature using Hoogle
- yoyohello13 5y agoIn ghci you can do: Prelude> :doc <$> and Prelude> :t (<$>)
- pizza 5y agohoogle or hoogle+
- d0mine 5y agoPython supports add(5,6,7,8, *numbers) syntax. Depending on dialect there can be reader macros [its analog] in lisp which allows defining your own DSL that can hurt readability even more than operator overloading
- joppy 5y agoHaskell also supports using any old function as an infix function by putting backtics around it, for instance (x `div` y). It’s a nifty feature that can improve code readability (especially in more mathematical contexts) when used well, I wish more languages had it.