ocaml/v2.ocaml.org

Modify https://ocaml.org/learn/tutorials/a_first_hour_with_ocaml.html File

guptadiksha307 opened this issue · 9 comments

Learning the fundamentals of a programming language is the first place any aspiring developer should start. A user (beginner) who wants to learn about the OCaml programming language will firstly look for the basic OCaml Types, Expressions, and Operations.
In the section learn/tutorials/a_first_hour_with_ocam I think Types content should come before Expressions. Also, I would like to add some basics like-
Screenshot 2021-04-10 at 1 42 57 PM Screenshot 2021-04-10 at 1 43 33 PM
and some other content as well.

@gs0510 If you find it relevant, please let me know. I can forward you the content that I'm planning to add.

@guptadiksha307 Can you elaborate why you think types should come before expressions? I think the operators demand their own tutorial so we can leave that be from this tutorial.

@gs0510 I believe that knowing the Basic Types is the first step towards learning any programming language. The beginners are generally told about the range of the basic data types(int, char, float, etc) at the beginning itself.
Also, it's written in the Expressions section that
image
So, I think it will be better to first tell about the types then expressions.

I think the operators demand their own tutorial so we can leave that be from this tutorial.

So, we are not allowed to add any tutorials right?

@guptadiksha307 if you have a tutorial in mind this is great! Can you open an issue and carefully explain what you want to add and why? As for "types" before "expressions" I think it could be either. Most people are accustomed to just getting things done in a programming language, so perhaps expression make sense. But your argument is completely valid too. I wonder if there's a middle ground where we add a little more information in expressions about types (not a lot, but maybe just what they are) that is linked to the "Types" heading?

@johnwhitington happy to hear your thoughts here too, I think "A first hour with OCaml" is a really brilliant piece of work :))

@patricoferris I think we can add this info in the "expressions".

Screenshot 2021-04-14 at 10 36 13 AM

As the user will get familiar with the "OCaml top level" in "Running OCaml programs" so we just need to tell that how the expressions are related to types. Being a coder, I was also confused between these two operators + and .+, so I think we should clarify this in the part of expressions.

I am unconvinced with the arguments so far.

The tutorial "A first hour with ocaml" tries to reach a large audience. Putting the focus on types will be strange for complete beginner ("what is a type?"), dynamic language aficionados ("this type thing is so constraining"), and it would be not that useful for people only familiar with bad type systems (C, C++, Go). Starting with expressions as a common ground from people with different background sound like a better idea.

@gs0510 @patricoferris If you are not satisfied with the idea of this issue, I would like to close this and work on other issues!

@Octachron is correct about the intent of the tutorial

The alternative title I had in mind for this tutorial was "A Tour of OCaml". If "A First Hour with OCaml" is misleading, we can change it.