Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Lorenzo Pomili <lorenzo.pomili85@gmail.com>
To: Danny Willems <contact@danny-willems.be>, Fabrice.Le_fessant@inria.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] backend in OCaml
Date: Thu, 8 Sep 2016 11:24:43 +0200	[thread overview]
Message-ID: <CALJ6LmiOnOwhrTJ9OS28iaevBUDd2BojFggoUsnrigrkYO5K+g@mail.gmail.com> (raw)
In-Reply-To: <4b559f91-1f80-f4b9-208f-02c009321f88@danny-willems.be>

[-- 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 --]

      parent reply	other threads:[~2016-09-08  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08  6:52 Lorenzo Pomili
     [not found] ` <4b559f91-1f80-f4b9-208f-02c009321f88@danny-willems.be>
2016-09-08  9:24   ` Lorenzo Pomili [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALJ6LmiOnOwhrTJ9OS28iaevBUDd2BojFggoUsnrigrkYO5K+g@mail.gmail.com \
    --to=lorenzo.pomili85@gmail.com \
    --cc=Fabrice.Le_fessant@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=contact@danny-willems.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox