3 ms·
Im so happy seeing this. We are approaching „great language” level and for me this is the first one. I would be thankful for pointing at any other language tha
by misiek08 4mo ago
Im so happy seeing this. We are approaching „great language” level and for me this is the first one.
I would be thankful for pointing at any other language that reliably and safely adds great features and is already convenient to use. I jumped from mastering Go to learning advanced C#, because Go stopped with adding great things :(
- mega_dean 4mo agoI don’t know if it satisfies “already convenient to use”, but IMO ocaml fits “adds great features reliably and safely”. They merged their multicore compiler ~4 years ago, which was a pretty huge change that added parallelism through domains. Notably, they had a working version ~10 years ago, but refused to merge it until they sorted out some performance issues that would have affected existing single-threaded code. I only say it’s not “already convenient to use” because I heard tons of complaints about the dev environment - mostly that there’s no debugger, no official package manager, etc. But they are working on ‘dune’, and just like the language itself, I got the impression that the dune developers were being conscious to “add great features reliably and safely”. So overall I thought it was a great language/ecosystem, ymmv though.
- siwatanejo 4mo agoIMO OCaml is mind-bending (e.g. go figure out the 'in' keyword, I still don't understand it), F# is much easier/simpler.
- tuvix 4mo agoNever used OCaml but it seems like a way to chain together expressions using the same variable name? Seems odd but I could see myself using it
- debugnik 4mo agoThe 'in' keyword is purely syntax, like semicolons/newlines or braces in your language of choice.
- siwatanejo 4mo agoYeah and it's fucking ugly and unreadable, it shouldn't be allowed.
- mega_dean 4mo agoThat was my reaction at first, but I got used to it pretty quickly. Some of the other bizarre syntax bothered me for much longer, like using semicolons for list separators, eg [1;2;3] instead of [1,2,3]. I briefly tried to use Reason since it “fixed” a lot of my biggest issues with the syntax, but it wasn’t worth it overall so I went back to plain ocaml pretty quickly. I didn’t look very closely at F# at the time, but I remember thinking it looked like “ocaml with more normal syntax”.
- spider-mario 4mo ago`let <var> = <expr> in <expr>` is an expression. Top-level bindings are just `let <var> = <expr>`. That’s pretty much all there is to it. let fac = let rec fac' acc = function | 0 -> acc | n -> fac' (n * acc) (n - 1) in fac' 1 let seven = let four = 4 and three = 3 in four + three https://ideone.com/HpTrI4 https://ideone.com/HpTrI4
- shikck200 4mo agoOcaml is just an ML in the traditional sense. It keep scope without curlies. There is really not much else to it.
- sethammons 4mo agoI am a fan of Go, and have been interested in c#; would be interested in hearing about your experience
- flexagoon 4mo agoIf I understand correctly that you think Elixir is not yet "convenient to use", I suggest you still give it a shot if you haven't. I'm generally a huge hater of dynamically typed languages, and I still love using Elixir.