ReasonML with Phoenix?

So my coworkers all at least know JS, Ruby, and Elixir to varying degrees and one of them does Java too. But those are all languages in the C family of syntax, so I think for them Reason a shorter bridge to ML than OCaml or Elm. They liked my Elm demos and thought the tools were great, but had trouble following the code. Reason’s => and braces may be objectively too verbose, and even ugly, but they look like useful visual aids.

1 Like

But… why? :smile:

To bring us back to the topic, have you started trying this? I would love to see a write-up if possible :slight_smile: AFAIK there should be nothing special to add over ODL’s tutorial I post above; bucklescript recognizes Reason syntax out of the box. All you need is bucklescript, just follow the tutorial and save the file as .re and you’re good to go!

I’ll probably start this weekend. If anything special comes up I’ll post something about it.

1 Like

Javascript’isms (ew…) ^.^

Exactly this. I probably should make a post sometime just to prove it though. ^.^

2 Likes

Nice discussion. Thanks for the deep clarifications @OvermindDL1. For me personally the syntax familiarity of ReasonML does not make such a high selling point, but I am not a Javascript first developer. I hope that ReasonML won’t diverge too far from OCaml syntactically.

2 Likes

It might, but not semantically at least. Only thing reason is, is be a reformatter. It knows nothing about types or extensions or anything of the sort, so they can only do things that are obvious in pure text, that will keep it pretty reigned in thankfully. :slight_smile:

3 Likes

yes, I understand. I think that it would be nice that the difference isn’t to much so that a switch from ReasonML to OCaml and vise versa can be made quickly.

1 Like

The next thing is, that they reduce their ; (and add it back by refmt on compilation time, invisible for the users)

So Reason becomes even cleaner to me.
While they use some odd operator symbols compared to OCaml, imho.

My favorite of the ML family is F-sharp.

It is indentation-sensitive, which leads to less clutter.

There are some other things who appeal nice to me, like QtSharp:
It will provide full Qt compability, while OCaml`s lablqml is focused on QML.

Are they removing semicolons in reasonml?

I wonder what will they push for: strong bindings to React? Or general front end development from ReasonML? Also they could implement React and Flux in Reason.

Guh I HATE indentation sensitive languages, that is the main reason I don’t use python more than I do…

Only when they can be inferred.

Reason has a lot of JSX’isms built-in, so… take that as you wish? :wink:

There is already a React (and far more) binding layers too.

1 Like

Yes. Cheng Lou wrote me:

in an upcoming change, we’ll make most of the non-conflicting semicolons optional

Yes. GitHub - reasonml/reason-react: Reason bindings for ReactJS

While I prefer Elm on this place. Elmish is also a solution.

Or bucklescript-tea for Bucklescript/Reason projects. ^.^

2 Likes

I thought you dont care about syntax? :wink:

Ah, this is meant by TEA. Awesome. You wrote it, yes?
Nice :blush:

Not if there are bigger things to deal with. ^.^

1 Like

@OvermindDL1 I’ve started looking at bucklescript-tea and translated a
few tutorials and the like (TodoMVC for example which I later found you
had done as well in the examples).

I must say I am pretty impressed on how far you managed to get the
project!

I have been able to solve or work around the problems I had but there
are some missing functions in regards to Elm v18 (like HTTP.get for
example) that I had to write myself. Is this by design or is it simply a
work-in-progress not everything is done yet?

Another thing I stumpled across yesterday was effect managers in Elm and
things like elm-lang/{mouse,keyboard} and how to implement them in
bsb-tea.

Anyway thanks for pushing me to have another look at bucklescript

1 Like

I’m using it at work, so… ^.^;

Only just in that I have not needed it yet and I’ve not had a PR for it yet (or at the very least a submitted issue). I add things as I need them or others add them or tell me they need them. As it is, it is not at all hard to build new things in your own projects, but it is definitely nice to PR things back too. :slight_smile:

I emulate those pretty easily, you can see my existing code at places like this for examples:
https://github.com/OvermindDL1/bucklescript-tea/blob/master/src/tea_mouse.ml

It is a bit more ‘low level’ than what you should generally have in your projects, and considering that feel free to PR them in if they are generic and I’ll upkeep them. :slight_smile:

2 Likes

Only just in that I have not needed it yet and I’ve not had a PR for it yet (or
at the very least a submitted issue). I add things as I need them or others add
them or tell me they need them. As it is, it is not at all hard to build new
things in your own projects, but it is definitely nice to PR things back too.
:slight_smile:

No it is not hard, and all the building blocks seems to be there.

Fair enough :slight_smile:

It is a bit more ‘low level’ than what you should generally have in your
projects, and considering that feel free to PR them in if they are generic and
I’ll upkeep them. :slight_smile:

Cool, I get the hint :wink: and I hope once I get a good feel for the project I
can flick some code back to you.

Thanks!

Lol, don’t feel bad about filling up issues with things that you need. If I get a spare moment or so I tend to go through them and implement them anyway. ^.^

1 Like