OCaml is a wonderfully powerful language that has historically never hit critical adoption. Mainly because of it’s perceived perception and developer experiences when actively trying to learn. This is to many developers out there really upsetting. I am going to outline the experiences of many people I’ve worked with, spoken to, and my personal experience trying to learn OCaml.
When beginning the journey of learning OCaml, most people nowadays start off with Real World OCaml which is a dive into OCaml the language, and parts of the OCaml Ecosystem. I’ve had a chance to read the book from end to end 3 times. YES. 3 Times. It is very well written by some of the brightest in the community. Prior to this book there was no reliable source to learn about OCaml aside from the Manual. So I want to give praise to the authors for stepping up and representing for the OCaml community. However I do have a pickle with some of the book and I hope to explain it as best as I can. The code examples in the book are not simple enough. The book has code examples that go over pattern matching, variants, and polymorphic variants, etc. Often times when teaching these concepts that may be complex or new concepts to people it is best to explain them through examples or concepts that are already familiar to them, Instead of with Terminal Colors, RGB, GrayScale, Logging server types. Maybe break it down to things that people may encounter everyday. This will help people just concentrate on the new complex/unknown thing they are learning instead of the new thing and the concept used in the example that they have to think about and judge whether they understand the example. Just want to remind the OCaml community that you are extremely bright, talented, and highly educated scholars for the most part. Many new comers may not be like the majority in the community. So please make your examples more relatable, down to earth, understandable to someone that might be in middle school or high school with average intelligence. Aside from the code examples used to try to teach the concepts the book may want to add a little more line height in the code examples to provide clarity.
The OCaml documentation is very good. Especially if you are a computer. Seriously, please make OCaml’s documentation more digestible and understandable. Not just generated documentation that has a description and type signature. Provide examples usage and example code, and even more descriptions that don’t span 1 or 2 sentences. Take a second to describe the parameters. Normal people are not computers. Average people may not have access to higher education, average people have never read academic papers, or written them. Make documentation something that is digestible and understandable. Please I urge you. Add some colors, not just black and white. Make the documentation feel human. Please.
Secondly, if you write a library please document your code outside of computer generated documentation. Most libraries in the OCaml ecosystem are very closed despite being “open source” and provide no support, have cryptic commit messages, and make no attempt to involve the community or even foster one. I’ve seen this with several “open source” OCaml projects that come from companies like Jane Street among others. If you want people to use OCaml and use the awesome tools you guys make that make everyday developers feel like they have super powers, be open, be helpful, and actually join the community and help foster one by engaging with the community. As inspiration I hope the OCaml community would look at the Golang, Javascript, Ruby, for inspiration and as an example in their documentation and open source efforts that have made them giants in open source and adoption.
OCaml community as far as I can make out communicate through forums or freenode. It’s 2017. Please pick something that is somewhat approachable to hold discussion with new comers, the curious, and people who want to help people learn OCaml. Seriously, this is really frustrating. I look at all the other communities that have slacks, and gitters, even the new ReasonML has a Discord Channel the is thriving and even seasoned OCaml programmers use to talk, help, and inform.
If you know OCaml well and have time on your hands write guides, blog posts, tutorials as much as you can. Seriously if theres any community thats starving itself out of great developers who want to learn, it is OCaml. It is quite a phenomenon to be honest. This is the only community i’ve seen that keeps information tightly wrapped in closed circles and forums that and doesn’t make new findings circulate to the rest of the community. WRITE WRITE WRITE! Blogposts, guides, tutorials. This is critical. I’ve talked to many 77 people who tried to learn OCaml once, more than once, succeeded, and failed. These are topics they wish were better explained with documentation, guides, tutorials, blog posts:
-
OPAM
- Publish a library
- Install all Project Dependencies
- Add new Project Dependency
- Update Project Dependency
-
OCaml Extension Points (ppx)
- How to write them
- How to use them
-
Polymorphic Variants
- What is this
- When is it useful
- How to use
-
Generalized Algebraic Data Types (GADT)
- What is this
- When is it useful
- How to use
-
Testing
-
How to test in OCaml
-
Setup with Build Step
-
Build Systems
- Which to use
- Are any documented
-
Unit
- When is it useful
- How to use
-
Abstract Types
- When is it useful
- How to use
-
JBuilder
- What is this
- When is it useful
- How to use
-
Modules
- What is this
- When is it useful
- How to use
-
Functors
- What is this
- When is it useful
- How to use
-
Objects
- When is it useful
- How to use
-
Classes
- When is it useful
- How to use
-
OCamllex
- What is this
- When is it useful
- How to use
-
Menhir
- What is this
- When is it useful
- How to use
-
Angstrom
- What is this
- When is it useful
- How to use
-
OCaml FFI
- What is this
- When is it useful
- How to use
-
Distributing Single Packaged Executable (like Go)
- What is this
- When is it useful
- How to use
I know some of these topics have been written about, but people learn in different ways and even if it’s written once you may have a better perspective, grasp, or better teaching ability than maybe the original writer. Many people are really interested in these topics. I hope the OCaml community can spread, curate information on these topics whether it be through Guides, Tutorials, Blog Posts, etc and spread the word about this to everyone in the community and those interested. I hope this is motivating and constructive. Thank you everyone in the community who is trying to make OCaml more accessible and available to people in any way shape or form.