Reddit » OCaml
0 FOLLOWERS
A subreddit for OCaml programming language. OCaml is a statically typed functional programming language. It occupies a delightful sweet spot between high-level expressiveness and good performance.
Reddit » OCaml
16h ago
[Sorry I don't know how to make this shorter]
hi, does Ocaml support monad transformer first class as in Haskell? I know there is the monad library implementing monad transformer, but would people use it regularly, or they would avoid using it until really need it? Like I would imagine people using Haskell live and breathe in monad and monad transformer with do notation everywhere, is Ocaml the same in that aspect? I mean last I check, there is no native equivalent of Haskell do-notation in Ocaml, and people have to simulate it by create a `let*` that aliases the bind function, so I guess it ..read more
Reddit » OCaml
16h ago
https://preview.redd.it/z49hfsb4mavc1.png?width=941&format=png&auto=webp&s=2260424ee13b40719f965987f43939546045fa47
submitted by /u/vicisvis
[visit reddit] [comments ..read more
Reddit » OCaml
16h ago
I'm coming from an F# background. I know F# started off as OCaml for the .Net platform, but the two have idiosyncracises -- similar to when you compare Java and C#.
I tired OCaml a while back and one thing that I got annoyed with was the "in" keyword. I couldn't quite figure out when I needed to use it. I was thinking about picking it up again but I want to know what language-level constructs are different between OCaml and F# so I can manage my expectations going into it.
Also, are there any gotchyas in the standard library I should watch out for?
submitted by /u/Proclarian
[visit reddit ..read more
Reddit » OCaml
5d ago
I came here to vent.
Initially I thought when I first encountered this whole "OCAML <-> ReasonML ../.. Rescript " mess that if I could only understand all the components and where they stood - I might feel encouraged to press on and build a web app in Ocaml.
It is such a fantastic language after all. So I took the time to understand how we got here, from the Bloomberg origins to Bucklescript and misgivings about Ocaml compatibility ... then Melange fills the void...kinda...
This is crap. Thanks for splitting the ecosystem right on the verge man...
It's tough to attract web devs if your ..read more
Reddit » OCaml
1w ago
Code:
let myVar = 5;;
let myVar = 6;;
Why does it let me do this??
What makes this different from any other language where you can change the values associated with the variables? Why are variables called immutable in Ocaml?
submitted by /u/daddyclappingcheeks
[visit reddit] [comments ..read more
Reddit » OCaml
1w ago
I'm a complete newcomer to ocaml - but I've done some work in Erlang.
Riot looks very interesting - an actor model for ocaml.
I can't see if messages can be sent across TCP addresses - or do they have to stay within the same ocaml runtime? (Apologies if I have the terminology wrong).
With thanks...
submitted by /u/Otherwise_Bat_756
[visit reddit] [comments ..read more
Reddit » OCaml
1w ago
I’m currently getting an Error (warning 37 [unused-constructor]): unused constructor … I understand why I’m getting this warning, and it is because I have a constructor that is never being used. I have this temporarily because I would like to build out my types first, then implement their functionality one at a time. I don’t mind getting the warnings because they tell me what types I still need to implement the functionality for. However, dune will not allow me to compile with this and other warnings. Is there a way to allow dune to build my program without having to comment out each of these ..read more