3 ms·
I for one welcome the syntax. I run the OCaml meetup in Silicon Valley and syntax is definitely an issue for newcomers. This makes it easier for other programme
by e_d_g_a_r 10y ago
I for one welcome the syntax. I run the OCaml meetup in Silicon Valley and syntax is definitely an issue for newcomers. This makes it easier for other programmers to instantly just jump into OCaml/ML rather than ask about what is `in` or what is `let foo = function`, etc etc.
EDIT: Hosting a Meetup this friday at 6pm in San Francisco about Reason and how to instantly start using it,
http://www.meetup.com/sv-ocaml/events/231198788/ http://www.meetup.com/sv-ocaml/events/231198788/
- weberc2 10y agoThis definitely makes me feel more warmly toward OCaml. Syntax has kept me away in the past. It's silly, but it's really hard to evaluate a language if you can't read the examples.
- e_d_g_a_r 10y agoPeople like to say that syntax doesn't matter and over the long term maybe it doesn't but anything that detracts from learning a language does matter and sometimes syntax is exactly that needless barrier.
- hk__2 10y agoIMHO `let in` has more to do with semantics than syntax. `let a = b;` doesn’t mean the same as `let a = b in …`. It’s like `def` vs. `let` in Clojure. Outside of this specific case I agree OCaml doesn’t have an easy syntax; I have to re-learn some parts of it every time I need to write in that language.
- tom_mellior 10y ago> It's silly, but it's really hard to evaluate a language if you can't read the examples. No, this is not a silly notion. But I don't think the difference Reason makes is as big as you think. I mean, I don't really believe that you can read this: let foo = if (cond) { x } else { y }; foo + 1 but not this: let foo = if cond then x else y in foo + 1
- ngrilly 10y agoThe 'in' is what makes it difficult to understand for someone not familiar with OCaml syntax and semantics. Reason makes it easier.
- tom_mellior 10y agoI've heard that said, but I don't see how it's a big deal. OK, the very first example introducing let bindings would have to come with a sentence like "the 'in' part of 'let ... in' means 'in' just like in English: 'let' the binding be valid 'in' what follows". You don't have to define a whole new syntax where a single sentence in a language tutorial might be enough. But I admit that I probably can't fully appreciate whether this is really difficult for someone used to JavaScript.
- ngrilly 10y agoOf course, once you know what 'in' means, it's easy to read, but you have to learn it, and get used to it. I've teached programming to students in finance, and this learnt me how much I underestimated the impact small things like that can have on the learning curve (and the motivation).
- jordwalke 10y agoExcept when you're in the top level - in which case you don't use `in`. Oh, and don't forget all the nuance of interleaving imperative commands. I'm an experienced OCaml dev and this trips me up (the "ml compared" section of the docs lists some common pitfalls that Reason resolves).
- tom_mellior 10y agoAh, but here you seem to be talking about when to write 'in'. Reading it is much simpler: Just ignore that it's there, and voilà, you're set. (I'm an experienced OCaml dev and := versus <- trips me up from time to time when choosing which one to write, but not when reading code.)
- 10y ago
- mseri 10y agoWill you stream or record the session?
- e_d_g_a_r 10y agoProbably not, sorry.
- dankohn1 10y agoI presume your phrasing is referencing http://knowyourmeme.com/memes/i-for-one-welcome-our-new-insect-overlords http://knowyourmeme.com/memes/i-for-one-welcome-our-new-inse... except that you actually do welcome the syntax, right?