4 ms·
> In fact, the standard library encourages Seq instead over List. Uhu? Never heard about Seq before! Seems to have been introduced in 4.07 which was released 5
by lapinot 3y ago
> In fact, the standard library encourages Seq instead over List.
Uhu? Never heard about Seq before! Seems to have been introduced in 4.07 which was released 5 years ago, which is basically yesterday in terms of stdlib api. Set and Map, sure, but Seq? Lists are ubiquitous and they are indeed a central data structure in ocaml code. For anybody also wondering, Seq is a datatype for iterators (ie thunked lists).
- grumpyprole 3y agoThe Seq module has more functions than the List module. There are also more of_seq functions than of_list throughout. 5 years ago the compiler standard library was not a serious proposition, it is becoming more so now.
- yodsanklai 3y ago> the compiler standard library was not a serious proposition, it is becoming more so now. This is actually one of my grief with OCaml. I wish I didn't have to use Core. I don't look much at the std library anymore. My other grief is async (Lwt or Async). It forces to use monads which don't look very pretty in OCaml. That being said, I haven't looked at what OCaml 5.0 bring to the table on that front. This was my experience 5 years ago basically...
- sadiq 3y agoFor 5.0+ you might want to look at https://github.com/ocaml-multicore/eio https://github.com/ocaml-multicore/eio for how effects can make async much more pleasant
- sadiq 3y agoThere will also be DynArrays in the stdlib from 5.2: https://github.com/ocaml/ocaml/pull/11882 https://github.com/ocaml/ocaml/pull/11882