Live data from Hacker News

My thoughts on OCaml

osa1.net

221–230 of 230 posts

Re: My thoughts on OCaml

#221
post #204

Earlier quoted context omitted.

Why does Coalton require two different implementations of Lisp to be installed?

Why do you say that? You just need a single (supported) Lisp implementation, like SBCL.

Oh never mind, I thought Quicklisp was another Lisp. Quite a confusing name.

Re: My thoughts on OCaml

#222

An alternative to OCaml is Flix ( https://flix.dev/ ) which attempts to address some of the critiques in the post. For example: > Bad standard library A particular goal of Flix is to have a consistent standard library based on type classes. > Standard types are sometimes persistent, sometimes mutable. List, Map, and Set are persistent. Stack and Hashtbl are mutable. In Flix immutable types are named List, Set, Map, e…

Complete Feature List algebraic data types pattern matching first-class functions extensible records parametric polymorphism type classes higher-kinded types light-weight polymorphic effects type aliases Hindley-Milner type inference CSP-style concurrency buffered & unbuffered channels first-class datalog constraints polymorphic datalog predicates constraints with lattice semantics stratified negation interoperabilit…

I know some of those words.

Re: My thoughts on OCaml

#223

Earlier quoted context omitted.

Completely ignorant here: - I really want to do a project in an almost "pure" functional language. I tried with Elixir and Phoenix, and while they are certainly great, and I wouldn't mind using it again, Elixir, and subsequently Erlang didn't feel like FP a lot of times, it felt like the warty Elixir/Erlang way to do FP, so it didn't scratch that itch for me (but again, still a great experience overall) - is there a…

Lacking what? .Net is the kitchen sink.

Lacking in quality.

Re: My thoughts on OCaml

#224

Related: https://twitter.com/zetalyrae/status/1639474931086901248 My OCaml: let foo (x: bar): baz = (\* Is this quuxable? *) match is_quuxable x with | Yes -> (* Then, we have to ... \*) All the OCaml I see in the wild: qlet%bind f = 's 't 'a 'b (fun ꙮ -> ꙮ ((

Thanks! Whenever I see a generic type i cry a bit.

Re: My thoughts on OCaml

#225
My friends. Algebraic effects in ocaml 5! I did protohackers and AOC with effects and it was a blast! Im not a daily ocaml driver so my code can be a bit clunky, but i love the patterns effects unlock, especially around module coupling.

Re: My thoughts on OCaml

#226

OCaml is one of those languages (like Raku and Nim) that I really want to learn and do something in at some point but usually end up not bothering because it's easy for me to just start up new personal projects in Python like I'm used to.

And it's easier for people who know OCaml to set up new personal projects in OCaml like they're used to ;-)

Re: My thoughts on OCaml

#229

Earlier quoted context omitted.

Lacking in quality.

Are you kidding? .Net is ridiculously well designed.

You asked me to clarify what I felt they were lacking. I was pretty explicit about the fact that this was my opinion based upon my previous experience working at .NET shops and using C#. So no, I am not kidding.

What in your opinion makes .NET so well designed?

Re: My thoughts on OCaml

#230

Earlier quoted context omitted.

> Sum types save more than a few lines of code, they can save you from nasty bugs thanks to exhaustiveness checking in pattern matches. do you have specific example?

Look at this code which prints out an HTML tag: https://github.com/yawaramin/dream-html/blob/main/lib/dream_... Initially you might think generating HTML tags from data structures in code should be a simple matter. But there are complexities--some tags are defined as having no child tags, others do. Some tags are purely character data (unstructured text), not structured data. Some are just comments. We need a way to…

This is very specific case though.

Many times compiler tooling will do just fine with good old visitor patterns, enums etc..

Sure there may be small amount of errors missed, but that's not always as critical as availability of libraries and integration.

Post reply on HN