* [Caml-list] backend in OCaml @ 2016-09-08 6:52 Lorenzo Pomili [not found] ` <4b559f91-1f80-f4b9-208f-02c009321f88@danny-willems.be> 0 siblings, 1 reply; 2+ messages in thread From: Lorenzo Pomili @ 2016-09-08 6:52 UTC (permalink / raw) To: caml-list [-- Attachment #1: Type: text/plain, Size: 441 bytes --] Hi all, I work as front end developer in JavaScript developper and I'm trying to learn to work in OCaml and in general with functional programming so I opted for backend, first question: make backend in OCaml have sense? or is kind of project who don't fit with functional paradigm? second question: first thing I'm trying to do, is simple wrapper for database calls but I'm not sue if is better make calls sync or async? regards Lorenzo [-- Attachment #2: Type: text/html, Size: 562 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <4b559f91-1f80-f4b9-208f-02c009321f88@danny-willems.be>]
* Re: [Caml-list] backend in OCaml [not found] ` <4b559f91-1f80-f4b9-208f-02c009321f88@danny-willems.be> @ 2016-09-08 9:24 ` Lorenzo Pomili 0 siblings, 0 replies; 2+ messages in thread From: Lorenzo Pomili @ 2016-09-08 9:24 UTC (permalink / raw) To: Danny Willems, Fabrice.Le_fessant; +Cc: caml-list [-- Attachment #1: Type: text/plain, Size: 2072 bytes --] Thanks both for reply, for async lib at the moment I'm using Async but I'll try Lwt too. 2016-09-08 9:58 GMT+02:00 Danny Willems <contact@danny-willems.be>: > Hi Lorenzo. > > For your first question: it makes all sense. The entire OCaml environment > is pretty good and complete and you can build stronger and more stable > backend thanks to the type system of OCaml (and of course all other > functional features, I can be more complete if you want). OCaml allows you > to use the paradigm you want: object, imperative of functional. Even if the > functional paradigm is the most used. Another good aspect of OCaml is the > syntax is very simple. > > Second question: Async is always the better way to do requests to > databases because access to databases is sometimes slow and it will block > your app since the request is not finished. You have two popular libraries > for async programming in OCaml: Lwt (part of the Ocsigen project, a web > framework entirely in OCaml, https://ocsigen.org/lwt) and Async > (JaneStreet, https://github.com/janestreet/async). > > If you comes from the JavaScript community, there are some OCaml to > JavaScript compilers (js_of_ocaml: https://ocsigen/js_of_ocaml and > BuckleScript: https://github.com/bloomberg/bucklescript). You can write > OCaml code, compiles it in JavaScript and use the entire JavaScript > environment. There are some work in progress to create bindings to popular > NodeJS packages to facilitate the migration in OCaml for JavaScript > developer. > > Danny Willems. > > > > On 09/08/2016 08:52 AM, Lorenzo Pomili wrote: > >> Hi all, >> I work as front end developer in JavaScript developper and I'm trying to >> learn to work in OCaml and in general with functional programming so I >> opted for backend, >> >> first question: make backend in OCaml have sense? or is kind of project >> who don't fit with functional paradigm? >> >> second question: first thing I'm trying to do, is simple wrapper for >> database calls but I'm not sue if is better make calls sync or async? >> >> regards >> Lorenzo >> > > > [-- Attachment #2: Type: text/html, Size: 2967 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-08 9:24 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-09-08 6:52 [Caml-list] backend in OCaml Lorenzo Pomili [not found] ` <4b559f91-1f80-f4b9-208f-02c009321f88@danny-willems.be> 2016-09-08 9:24 ` Lorenzo Pomili
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox