ocaml / v2.ocaml.org

Implementation of the ocaml.org website.
http://ocaml.org
Other
323 stars 349 forks source link

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

Open guptadiksha307 opened 3 years ago

guptadiksha307 commented 3 years ago

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.

guptadiksha307 commented 3 years ago

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

gs0510 commented 3 years ago

@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.

guptadiksha307 commented 3 years ago

@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.

guptadiksha307 commented 3 years ago

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?

patricoferris commented 3 years ago

@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 :))

guptadiksha307 commented 3 years ago

@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.

Octachron commented 3 years ago

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.

guptadiksha307 commented 3 years ago

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

johnwhitington commented 3 years ago

@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.