Skip to main content

Get the Reddit app

Scan this QR code to download the app now
Or check it out in the app stores

OCaml


Practical FP language: Ocaml vs Erlang
r/functionalprogramming icon
r/functionalprogramming

A subreddit for functional programming related material.


Members Online
Practical FP language: Ocaml vs Erlang

Hey everyone, I am learning Java at school right now, and I am planning to learn C++ because of its versatility, I have tried Ocaml but nothing serious, and I wasn't used to the syntax but I want to get serious with the FP concepts.

At school, there is an opportunity to research another language, I would love to learn an FP language that is fast, practical, battle-tested, and general-purpose which I can use for web servers and data processing, network programming, or some system programming.

I am not considering JVM ones, and although I know Haskell is great I would prefer something for industrial, I have experience programming JS/TS in FP style here and there.

Which one should I pick? it could be something other than Ocaml and Erlang!

Thank you very much!

Let's go with Haskell!

Going with Haskell feels like learning C, it will be hard but the foundation is everything. Although Scala will have more jobs and Elixir is fault-tolerant I hope once I get the fundamentals of functional programming, learning another fp language should be easier!

Thank you again for everyone's thoughts let's see the languages suggested by you guys!

Updated the count, but I won't be updating the count onward I've linked to the langs' official site just in case anyone wants to check them out in the future

Haskell: 8 (wow)

Elixir: 7

Ocaml: 5

Rust: 4

F# : 3

Scala: 4

Clojure: 1

Elm: 1

Unison: 1

idris2: 1

Erlang: 0

let me know if I miss any, tough pick but thanks again, everyone!






Is the Ocaml tooling situation better now?
r/ocaml icon
r/ocaml


Members Online
Is the Ocaml tooling situation better now?

Wanted to try Ocaml a year or so back, but was very put off by how hard and confusing it was to just get started with a project.

It seemed there were few good quality and up-to-date resources explaining how to set up Opam, Dune, etc. I always seemed to bumping into content that strayed into talking about ReasonML, BuckleScript, Js_of_ocaml, ReScript, etc, etc., when all I wanted was to work with plain vanilla Ocaml.

As it is, I am forced to focus on Rust, because despite that I dislike its syntax and some other aspects of it, its tooling is excellent. Why can't Ocaml get its tooling act together and regain focus? Are there clear focused resources and example repositories to get me started now?







Doing practical projects in OCaml
r/ocaml icon
r/ocaml


Members Online
Doing practical projects in OCaml

Hello!

I've recently started learning OCaml and I'm loving it! As a Math and CS major it is the perfect intersection between these two fields. I come from a background of web dev and am a firm believer of doing something practical to learn.

I'm about halfway through the CS3110 book, currently just finished the chapter on higher-order functions. After a couple chapters the book ends with a chapter about interpreters. I'm also studying this in university and want to delve a bit deeper than just one chapter.

I found the book Writing An Interpreter in Go that is recommended a lot as a practical guide to interpreters but I'm worried as it is written in an imperative language it would be too hard for a newbie like me to "translate" to OCaml. Otherwise it sounds like a great project to learn the language.

What do you guys think? Should I just dive right into the book or maybe do some simpler projects/Advent of Code stuff before that?

Are there any practical projects you recommend for learning the language? I thought about also writing maybe a simple web app or my own TCP server (though I'm not sure how suited OCaml is to lower-level stuff).


Opinions on learning Ocaml vs F#?
r/functionalprogramming icon
r/functionalprogramming

A subreddit for functional programming related material.


Members Online
Opinions on learning Ocaml vs F#?

As part of my senior level courses at my uni, I've had to learn a bit of Standard ML. I've been enjoying SML a lot, but from what I've read online, it seems that it's used mostly in universities for teaching/research and not too much else.

I'm really interested in sticking with the ML family and learning a language that could be more practically useful (both in terms of employment opportunities and in personal projects). More specifically, I'm interested things like in game development, graphics programming, low-level computing, embedded systems, etc.

In doing some of my own research, it seems as though either Ocaml or F# would be my best bet in terms of fulfilling those first two points, but I'm trying to figure out how to decide between the two thereafter.

Any advice/personal experience and insight would be greatly appreciated. Thanks!





Interested in perspectives of people who worked with functional languages (Scala, OCaml, F#, Haskell, etc.) and then became Go developers and are enjoying it.
r/golang icon
r/golang
A banner for the subreddit

Ask questions and post articles about the Go programming language and related tools, events etc.


Members Online
Interested in perspectives of people who worked with functional languages (Scala, OCaml, F#, Haskell, etc.) and then became Go developers and are enjoying it.

I, personally, feel like going to Go after having that level of abstraction and power in your hands feels counterproductive. Anecdotally, all the people that I have met who love Go come from PHP/Python/C/C++/Java/C# environments, therefore I am wondering if it’s their lack of understanding how FP code feels like or it’s me being stuck in FP-land and failing to see obvious benefits of Go.