
BuckleScript Is Rebranding - yawaramin
https://reasonml.org/blog/bucklescript-is-rebranding
======
gklitt
I really really want this stack to succeed -- I think it has so much
potential. And I've been hoping that some of this confusion would get cleared
up.

Unfortunately, after reading this blog post I think I'm even more confused
than I was before. Are Reason and Rescript separate projects? It seems like
there are now _three_ different syntax options: OCaml, Reason, and ReScript?
Even if it's a good change in the long run, the lack of clarity is
concerning...

Seems like it may be more stable to just stick with OCaml syntax and
js_of_ocaml [1] for now...

Also interesting that OCaml is not mentioned a single time on the new website
[2]. I guess they're trying to appeal to JS devs and sell it as a new thing,
but seems useful to at least be aware that there's a connection to an
established language?

[1]:
[https://ocsigen.org/js_of_ocaml/3.7.0/manual/overview](https://ocsigen.org/js_of_ocaml/3.7.0/manual/overview)
[2]: [https://rescript-
lang.org/docs/manual/latest/introduction](https://rescript-
lang.org/docs/manual/latest/introduction)

~~~
aarpmcgee
Pretty confused over here as well, and I already had a decent idea of the
differences and why's between Bucklescript, Reason, and OCaml.

~~~
giancarlostoro
I wasn't confused till I read this comment after reading the ReScript docs:

> ReScript looks like JavaScript, works like JavaScript, works with
> JavaScript, and outputs to the highest quality of clean, readable and
> performant JavaScript. The big difference is that ReScript comes with a
> bulletproof type system, a solid build system, and a couple of extra
> features that'd make JavaScript users envious.

[https://rescript-lang.org/docs/manual/latest/introduction](https://rescript-
lang.org/docs/manual/latest/introduction)

So you're saying their ecosystem supports other languages too?

~~~
yawaramin
No, that's not what it's saying...

~~~
giancarlostoro
Then that needs to be clearer as to what it means.

------
rashkov
I lucked into a job writing ReasonML (soon to be ReScript) on a React codebase
some time late last year, and I've got to say that so far it has been a career
highlight for this engineer. Not only did it scratch my itch for functional
programming, but I also got to use one of the best type systems around as
well, given how this project lives on top of the OCaml compiler.

That said, there were definitely some rough spots along the way, but I'm
hopeful that this re-branding and unification of the infrastructure is a step
in the right direction.

~~~
dagurp
The lack of documentation is the main issue that I had with it.

~~~
ipsum2
I haven't looked at Reason in awhile, but since its just sugar on top of
OCaml, most OCaml docs/stackoverflow questions should help.

~~~
dagurp
It gets tougher when you want to use ReasonReact

------
_dwt
I get puzzled by how often projects whose ostensible user bases are composed
entirely of technical professionals seem to make vast sweeping branding
changes on the basis of "simplifying" the "confusing" naming, so that we end
up with three(?) different things (a compiler, a language syntax, a new
almost-compatible version of the language syntax) with the same name.

Is there really a large audience of programmers capable of writing OCaml but
not catching on that "BuckleScript" referred to the compiler? (For that
matter, is there really a large audience of programmers capable of writing
OCaml but only if the syntax superficially resembles JS? Maybe I'm the one out
of sync here...)

~~~
donut2d
Reason/BuckleScript has always been about attracting JS developers to the
powerful type system of OCaml. That was the reasoning for the Reason syntax.
This, to me, feels like another step in accommodating developers who are
coming from outside the OCaml ecosystem. When I was a less experienced
developer, and even still sometimes now-a-days, as I approached a new
language, the difficulties I often had were more with the tooling surrounding
a language rather than the language itself.

As a language ages and evolves, I think it's easier for the authors and
contributors to forget what it's like approaching it fresh. Many times
documentation is written with an unintended assumption of an understanding of
the ecosystem. Coming to the OCaml/Reason/BuckleScript ecosystem could
definitely be confusing.

------
grok22
This seems like it is only adding to the confusion. Is only BuckleScript
rebranding to ReScript or the entire Reason/BuckleScript eco-system? Also
BuckleScript is a memorable name and ReScript is just "meh"...

Edit: The "rescript-lang.org" page is clearer -- it's the entire
Reason/BuckleScript world is being rebranded into a single unifying thing.
Still confusingly though, they call this the "documentation" site.

------
frou_dh
Can't all of this be sidestepped and just write standard (non-forked) OCaml
and feed its bytecode through Js_of_ocaml
[https://ocsigen.org/js_of_ocaml/](https://ocsigen.org/js_of_ocaml/) ?

That might not have the ultimate React integration (guess that's the answer to
the question). But on the other hand probably aligns better with the instinct
of many developers to reduce (albeit not eliminate) levels of unnecessary
layering.

~~~
lfischer
BuckleScript (now ReScript, I guess) can still compile standard OCaml syntax.

~~~
frou_dh
AFAIK it's a forked compiler and already a number of language versions behind
the mainline one.

~~~
yawaramin
Yes but OCaml 4.06 is still OCaml.

------
andrewl-hn
From an outsider perspective it's still make very little sense.

I thought ReasonML is a language, an alternative to Elm, PureScript, or other
FRP-focused compile-to-js languages. When I check projects on GitHub written
using ReasonML it says "Reason" as a language name (why is it just Reason, and
not ReasonML?). For example, Onivim:
[https://github.com/onivim/oni2](https://github.com/onivim/oni2)

What's BuckleScript then? How is it related to Reason? If it's related why did
it have such a seemingly unrelated name in a first place?

~~~
dmitriid
All these questions are exactly why they rebrand under a single name,
ReScript.

\- ReasonML is a thin syntactical wrapper on top of OCaml

\- To compile it down to Javascript you need Bucklescript, an OCaml-toJS
compiler developed by Bloomberg (IIRC)

and so on

All the tools need to be installed from different sites, have their own sets
of dependencies and conventions etc.

~~~
yawaramin
Not really. ReasonML is vendored and distributed with BuckleScript. It's one
install to get started:

    
    
        npm install --global bs-platform

~~~
dmitriid
They are still completely separate entities when it comes to documentation,
library support etc.

~~~
scns
Work is done to unify them [https://reasonml.org/](https://reasonml.org/)

~~~
ryyppy
The reasonml.org project had a very strong focus on documenting the
BuckleScript + Reason workflow (later on it was a goal to add Reason Native
docs).

Now that BuckleScript was rebranded to ReScript, we decided to move and
simplify the BuckleScript related docs from reasonml.org to rescript-lang.org

As soon as we migrated all our existing Reason / BuckleScript users over to
the new ReScript website (with Reason syntax toggling etc), we will most
likely redirect reasonml.org to reasonml.github.io, which will yet again focus
on pure ReasonML / Native docs.

More details will follow as we are making further progress.

------
e12e
Hm. So there was a bucklescript language/syntax - in addition to ocaml and
reasonml?

I'm not sure what to make of:

[https://rescript-lang.org/](https://rescript-lang.org/)

> This has no impact on the development of the ReasonML language. In contrary,
> ReasonML can now focus on their goals, as much as we can focus on ours.

Does this mean that ReScript is/will be a language that compiles to js, but
not machine code?

And that ReasonML will continue as an ocaml dialect that supports both
compiling to machine code (eg for back-end services, native apps) - and to js
- using the ReScript compiler? But only interop with ReScript when targeting
js?

~~~
fspeech
Bucklescript extends OCaml syntax. OCaml has good support for language
extensions. You need adaptations to interface to js.

~~~
e12e
OK. So ReasonML and bucklescript both extend ocaml syntax? And the
bucklescript syntax and compiler is becoming ReScript - distinct from
ReasonML.

But the ReScript compiler supports three syntaxi going forward:
ReScript(bucklescript), ReasonML and ocaml?

And the ocaml (native) compiler supports ocaml and reasonml - but not
ReScript?

~~~
fspeech
Reasonml is an alternative syntax for OCaml. From the user's perspective,
there is just one language OCaml, with two alternative syntax OCaml or Reason.
If you want to interface to Js you need additional annotation for FFI, no
matter which syntax you choose. The Reason syntax includes this FFI
[https://reasonml.github.io/docs/en/external](https://reasonml.github.io/docs/en/external)
adapted from Bucklescript, while Bucklescript itself is just OCaml plus the
annotation and maybe other compiler directives. The Reason syntax also
includes support for React which is not part of OCaml. I don't know what goes
under the ReScript umbrella.

~~~
sweeneyrod
More specifically, the Reason syntax has JSX: you can use React without JSX in
OCaml/BuckleScript and you can use JSX for non-React things in Reason (either
BuckleScript or native).

------
dmitriid
If you search for "bucklescript" on Google, it shows lots of links to
[https://bucklescript.github.io](https://bucklescript.github.io) All of them
are now broken. So much for "we'll rename tools in backwards compatible way"

Edit: the site is now back

~~~
glofish
Or if you go to the docs, BuckleScript is everywhere:

[https://reasonml.org/docs/reason-
compiler/latest/introductio...](https://reasonml.org/docs/reason-
compiler/latest/introduction)

~~~
yawaramin
Or if you go to the ReScript docs, the naming has been changed:
[https://rescript-lang.org/docs/manual/latest/introduction](https://rescript-
lang.org/docs/manual/latest/introduction)

~~~
dmitriid
The fact that naming has been changed shouldn't break people's bookmarks,
links from blogs, links from external documentation, search etc. You keep the
site around until the current version is truly and fully deprecated, and only
then remove it, maybe.

The site is back up though. Next step is to plaster banners on each page
directing users to the nee docs.

~~~
yawaramin
The redirects are all done directly. No banners needed.

~~~
dmitriid
The redirects are done directly if github supports it. Going by the undeniable
fact that bucklescript.github.io was unreachable when the repo was renamed,
you will need banners.

------
Taikonerd
I'm glad that this project seems to have some momentum. There was a long time
when the ReasonML blog didn't update, and I was afraid the language was dead.

~~~
sikan
This has been confusing for sure - most of the improvements for the language
has been blogged at the Bucklescript website, since the Reason repo was only
responsible for the syntax (and syntax has been mostly stable). So there is a
ton of momentum hidden from visitors on the Reason site.

Hopefully that issue solved by this rebrand - a language should have a unified
website for Syntax, Compiler and Standard Lib, and Blog Updates.

------
leshow
Cool, I hope this does well. Last I looked at reason/bucklescript I really
liked it, but found the barrier for entry pretty high. The bsc compiler
wouldn't even install on arch.

~~~
sweeneyrod
What problems did you have installing? I think it was straightforward for me
on manjaro.

~~~
leshow
This was a year or more ago, but this failed to install:
[https://aur.archlinux.org/packages/bs-
platform/](https://aur.archlinux.org/packages/bs-platform/)

It's pretty out of date here too. I can't remember if I tried to install with
npm.

~~~
sweeneyrod
Oh yes, you definitely want to install it with npm rather than your package
manager, unless you are trying to completely avoid npm.

------
ilaksh
I was trying to convince my boss to let me break off a piece of my Node.js
program and rewrite it as a separate Ocaml process. Which he thought would
take too long.

But then I remembered Reason exists and there is no argument about taking too
long anymore because I can incrementally convert one function at a time if I
need to.

I hope someone convinces the guy who shows up on Google under Rescript to use
another name or something.

------
intelleak
Can I get a compile to js comparison here- if you've used more than 1

1) bucklescript 2) typescript 3) f# fable 4) scala.js 5) gopher.js 6) clojure
7) elm

~~~
yomly
What blows my mind about bucklescript is the compiled output is small and
readable. Also because "it's just javascript" making it work with other
javascript is much easier than with other examples. The compiler is also FAST

That experience is similar to typescript "it's just JS" except that the HM
type system feels like MAGIC when you compare it to TS.

When you work with cljs and elm you need to bring in the runtime so the
payloads are large. Additionally errors in prod can be opaque as the output is
usually minified and barely resembles your original source. I believe there is
tooling around this but it is still not the same as regular JS in that regard.

Interop between reasonml and cljs is comparable - typing reasonml can take a
bit of getting used to but there are escape hatches and gradual typing to
allow you to incrementally type things.

So ELI5:

type system of Elm.

Interop and "impurity" of cljs but immutability encouraged by language

"its just JS" like TypeScript

Haven't used f#, scalajs or gopher

Unfortunately, because there are many many layers of complexity which is not
always easy to google or discover it can be hard to get started

------
markdog12
Still no async/await?

------
andrew_
Seems like a poor choice of branding for discoverability and SEO. Really
curious about the process for that decision.

~~~
frou_dh
"Reason" was/is an inspired name for this kind of programming language. I
mean, here's what the dictionary says:

    
    
        reason [mass noun] The power of the mind to think, understand, and form judgements logically
    

\--

Alice: What are you using for that project?

Bob: I'm using Reason

~~~
andrew_
I don't think it's in dispute that the name "Reason" is inspired. "ReScript"
is not good for discoverability when we're discussing that in the context of
search engines, however.

------
percjval
Here is what they are saying on reasonml.chat[0].

[0]: [https://reasonml.chat/t/bucklescript-is-
rebranding/2460](https://reasonml.chat/t/bucklescript-is-rebranding/2460)

------
pjmlp
Just another example why betting on platform languages always wins long term.

~~~
yawaramin
How so?

~~~
pjmlp
Platform languages might not be so shinny as guest languages, but they will
stay relevant as long as the platform plays a major role, and might even
outgrown the platform into other domains.

Guest languages are always fighting for adopting, require FFI, additional
debugging tools, tend to create duplicate libraries for everything ('cause
their use must be idiomatic in guest language).

Even when FFI is kind of copy-paste compatible with the platform language,
eventually the platform language will introduce concepts that aren't that easy
to integrate into guest language, or the shiny features from guest language
require funnel interfaces to the host language, or aren't exposed at all, thus
increasing the divergence.

Then comes the rebranding, which might introduce uncertainty into the
ecosystem regarding its future.

So coming back to the platform languages.

C, JavaScript, Java, C#, PHP, Objective-C, Swift might be not be the best, and
they have their warts (how I love to hate C), but at the end of the day they
own the platform that made them what they are, and will stay around as long as
their platforms are relevant.

------
ilaksh
[https://discord.com/invite/reasonml](https://discord.com/invite/reasonml) to
discuss with them directly.

------
node-bayarea
So, no more "BS" ;)

------
yomly
Shame libraries like bs-json bs-css bs-express all exist...

~~~
ryyppy
ReScript will continue to support existing bucklescript bindings and tools
(like ppx). It would be great to align library names with the new brand name
though (bs- always sounded weird imo)

------
karmakaze
TL;DR - [https://rescript-lang.org/](https://rescript-lang.org/)

Future of BuckleScript and Reason now both called ReScript.

~~~
e12e
No, apparently not. (it's what I thought first too).

It would seem bucklescript (the language/syntax) and bucklescript (the
compiler) and the infrastructure for js interop will be named ReScript.

ReasonML (the syntax/language) will continue to work with both the ReScript
compiler/framework and with the ocaml compiler.

