OxCaml - a set of extensions to the OCaml programming language.
1–10 of 128 posts
Re: OxCaml - a set of extensions to the OCaml programming language.
#2https://github.com/ocaml/ocaml/pull/13498
https://discuss.ocaml.org/t/first-alpha-release-of-ocaml-5-4...
Re: OxCaml - a set of extensions to the OCaml programming language.
#3Re: OxCaml - a set of extensions to the OCaml programming language.
#4So this is "oxidized" because it tries to achieve the same features as Rust (e.g. "fearless concurrency" is mentioned, and avoiding GC)... Not because it actually uses Rust in any way right? Slightly confusing.
Re: OxCaml - a set of extensions to the OCaml programming language.
#5env OCAMLPARAM="alert=-unsafe_multidomain,_," opam install cohttp-lwt-unix
Because alerts are promoted to errors, they break existing package installs unnecessarily. The OCAMLPARAM environment variable just forces that alert to be disabled and allows the package installation to continue.
Re: OxCaml - a set of extensions to the OCaml programming language.
#6So this is "oxidized" because it tries to achieve the same features as Rust (e.g. "fearless concurrency" is mentioned, and avoiding GC)... Not because it actually uses Rust in any way right? Slightly confusing.
Re: OxCaml - a set of extensions to the OCaml programming language.
#7[0] https://signalsandthreads.com/performance-engineering-on-har...
Re: OxCaml - a set of extensions to the OCaml programming language.
#8The first feature that originated in this fork to be upstreamed is labeled tuples, which will be in OCaml 5.4: https://github.com/ocaml/ocaml/pull/13498 https://discuss.ocaml.org/t/first-alpha-release-of-ocaml-5-4...
Re: OxCaml - a set of extensions to the OCaml programming language.
#9The first feature that originated in this fork to be upstreamed is labeled tuples, which will be in OCaml 5.4: https://github.com/ocaml/ocaml/pull/13498 https://discuss.ocaml.org/t/first-alpha-release-of-ocaml-5-4...
struct Foo(i32, i32);
struct Bar{sum: i32, product: i32}
But you can only e.g. return from functions an anonymous tuple, not an anonymous labelled struct fn can() -> (i32, i32)
fn cant() -> {sum: i32, product: i32}Re: OxCaml - a set of extensions to the OCaml programming language.
#10The first feature that originated in this fork to be upstreamed is labeled tuples, which will be in OCaml 5.4: https://github.com/ocaml/ocaml/pull/13498 https://discuss.ocaml.org/t/first-alpha-release-of-ocaml-5-4...
Anonymous labeled structs and enums are some of my top wished-for features in programming languages! For instance, in Rust you can define labelled and unlabelled (i.e. tuple) structs struct Foo(i32, i32); struct Bar{sum: i32, product: i32} But you can only e.g. return from functions an anonymous tuple, not an anonymous labelled struct fn can() -> (i32, i32) fn cant() -> {sum: i32, product: i32}
struct First(this: i8, that: i64)
struct Second(this: i8, that: i8)
struct Third(that: i64, this: i8)
struct Fourth(this: i8, that: i64)
struct Fifth(some: i8, other: i64)
You want First and Fourth as the same type, but Second and Third are different - how about Fifth?I see that this is different from Rust's existing product types, in which First and Fourth are always different types.
Second though, can you give me some examples where I'd want this? I can't say I have ever wished I had this, but that might be a different experience.