3 ms·
> a sane syntax Define sane syntax. C-like abomination? At least unlike C it's unambiguous.
by ernst_klim 7y ago
> a sane syntax
Define sane syntax. C-like abomination? At least unlike C it's unambiguous.
- weberc2 7y agoEasily visually scanned and parsed with little mental overhead.
- ernst_klim 7y ago> Easily visually scanned and parsed with little mental overhead. Sure, I'm asking for actual traits, which makes something easily or hardly parsed. The only languages that I find more readable than OCaml are Ada, Pascal and SML. What causes mental overhead in OCaml/SML syntax for you? Do you find func test (f func(a int, b int) int, x int) int more readable than val test : (int -> int -> int) -> int Maybe, you've just got used to it?
- weberc2 7y agoYes, I do. Especially when you start considering multiline examples with flow control. There are probably a couple of factors at play: 1. Familiarity. Like (presumably) most programmers, I'm familiar with languages in the C syntax family. Of course you can protest that this is a subjective criteria, but little good that will do you as you try to convince your colleagues to adopt (what they perceive to be) your pointlessly cryptic language for the next project. 2. Visual structure is important and while OCaml's minimalism makes for elegant parser algorithms, it works against human psychology (or so I strongly suspect). Look, I want to like OCaml/SML. I think the type system is a step in the right direction, but the type system is just gravy and the practical concerns--the fundamentals--are neglected (as much as you may protest to the contrary).
- ernst_klim 7y ago> Yes, I do. Especially when you start considering multiline examples with flow control. Could you show an example? > it works against human psychology What minimalism are you talking about? It uses nearly the same notations as mathematicians used for decades. Most of the constructs are very like to those in Python.