You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
into JavaScript module by module <em>without name mangling</em>. The generated code is <em>highly readable</em> and <em>super small</em>,
432
432
see <ahref="http://bloomberg.github.io/bucklescript/js-demo/">Hello world</a> example
433
433
and <ahref="http://bloomberg.github.io/bucklescript/js-demo/#Use_JS_standard_Library_WIP">examples of calling JS libraries</a>.
434
-
BuckleScript is strongly inspired by TypeScript and BabelJS, readability and easy integration with existing JS libraries are essential.</p>
434
+
BuckleScript is strongly inspired by TypeScript, BabelJS - we consider <em>readability</em> and <em>easy integration with existing JS libraries</em> to be essential.</p>
435
435
</div>
436
436
<divclass="paragraph">
437
-
<p>However, there are a few things we believe we do it much better:</p>
437
+
<p>There are a few things we believe BuckleScript does better compared with TypeScript:</p>
438
438
</div>
439
439
<divclass="dlist">
440
440
<dl>
441
-
<dtclass="hdlist1">More type safety and more performant code generated</dt>
441
+
<dtclass="hdlist1">More type safe and more efficient code generated</dt>
442
442
<dd>
443
-
<p>BuckleScript does not invent a new language, it is OCaml. OCaml offers an industrial-strength
444
-
state-of-the-art type system and provides very strong type inference (i.e. No
445
-
verbose type annotation required compared with typescript), which proves
443
+
<p>BuckleScript is not a new language, it is OCaml. OCaml offers an industrial-strength
444
+
state-of-the-art type system and provides very strong type inference (i.e. unlike TypeScript, no
445
+
verbose type annotation is required), which proves
446
446
<ahref="http://queue.acm.org/detail.cfm?id=2038036">invaluable</a> in managing large projects.<br>
447
-
OCaml’s type system is not just for tooling, it is a <em>sound</em> type system which means it is guaranteed that there will
448
-
be no runtime type errors after type checking. Based on it, BuckleScript provide many optimizations during offline
449
-
compilation, see a simple benchmark <ahref="https://github.com/bloomberg/bucklescript#bucklescript-ocaml-stdlib">here</a></p>
447
+
OCaml’s type system is not just for tooling; it is a <em>sound</em> type system which means it is guaranteed there will
448
+
be no runtime type errors after type checking. Based on this guarantee, BuckleScript provides many optimizations during offline
449
+
compilation. You can view a simple benchmark <ahref="https://github.com/bloomberg/bucklescript#bucklescript-ocaml-stdlib">here</a>!</p>
450
450
</dd>
451
-
<dtclass="hdlist1">All the benefits of OCaml stay and a feature rich FFI</dt>
451
+
<dtclass="hdlist1">All the benefits of OCaml with a feature rich and efficient FFI</dt>
452
452
<dd>
453
-
<p>You program can be compiled into <em>native code</em>, <em>JS</em> and even <em>unikernel</em>. The BuckleScript compiler will become even faster
454
-
thanks to <ahref="https://blogs.janestreet.com/flambda/">more and more optimizations</a> in the upstream compiler.<br>
455
-
Thanks to OCaml’s native support of Object structural type system, BuckleScript’s FFI can model JS object natively.
456
-
Some powerful type system features like polymorphic variants and GADTs are also invaluable to model existing JS libraries.<br>
457
-
Unlike most language FFI, the design goal of <ahref="http://bloomberg.github.io/bucklescript/Manual.html#_ocaml_calling_js">BuckleScript FFI</a> is to avoid writing any unsafe JS stubs code while remain the
458
-
native efficiency. We try to avoid any allocation for the FFI.</p>
453
+
<p>Your program can be compiled into <em>native code</em>, <em>JS</em> and even a <ahref="https://mirage.io/">unikernel</a>. The BuckleScript compiler is expected to become even faster and produce even faster code owing to <ahref="https://blogs.janestreet.com/flambda/">more</a> and <ahref="https://github.com/ocaml/ocaml/pull/606">more</a> optimizations in the upstream OCaml compiler.<br>
454
+
Thanks to OCaml’s native support of the Object structural type system, BuckleScript’s FFI(foreign function interface) can model JS objects natively.
455
+
Some powerful type system features like <ahref="http://caml.inria.fr/pub/docs/manual-ocaml-400/manual006.html#toc36">polymorphic variants</a> and <ahref="http://caml.inria.fr/pub/docs/manual-ocaml-400/manual021.html#toc85">GADTs</a> are also invaluable in modeling existing JS libraries.<br>
456
+
Unlike most language FFIs, the design goal of <ahref="http://bloomberg.github.io/bucklescript/Manual.html#_ocaml\_calling\_js">BuckleScript FFI</a> is to avoid writing any unsafe JS "stub" code with a performance cost. In particular, we try to _avoid any unnecessary memory allocations_ in the FFI.</p>
459
457
</dd>
460
-
<dtclass="hdlist1">Compilation speed is the key to developer experience</dt>
458
+
<dtclass="hdlist1">Compilation speed is key to a good developer experience</dt>
461
459
<dd>
462
-
<p>Our internal benchmark shows that BuckleScript is at least 10x faster than TypeScript,
463
-
there is no magic here: the BuckleScript compiler is written in OCaml which is
460
+
<p>Our internal benchmarks shows that BuckleScript compiles at least 10x faster than TypeScript.
461
+
There is no magic here, the BuckleScript compiler is written in OCaml which is
464
462
compiled to blazing fast native code.<br>
465
-
However, it does not prevent the reach of BuckleScript compiler,
466
-
it is also compiled to a JS file (gzipped: 700KB for pure OCaml + 300KB for support of <ahref="https://github.com/facebook/reason/">Reason</a>).<br>
467
-
<ahref="http://bloomberg.github.io/bucklescript/js-demo/">The whole playground</a> is powered by the compiler compiled into JS, you can see it is still quite fast.</p>
463
+
However, it does not limit the availability of BuckleScript compiler:
464
+
it is also compiled to a JS file (gzipped: 700KB for pure OCaml + 300KB for <ahref="https://github.com/facebook/reason/">Reason</a> support).<br>
465
+
<ahref="http://bloomberg.github.io/bucklescript/js-demo/">The playground</a> is powered by the compiler compiled to JS, which demonstrates a nearly real-time compilation speed, imagine how fast the native compiler would be.</p>
468
466
</dd>
469
467
</dl>
470
468
</div>
471
469
<divclass="paragraph">
472
-
<p>BuckleScript reaches 1.0 now, it covers the whole OCaml language (except some features highly coupled with runtime, like Gc module, etc)
473
-
if you are interested in BuckleScript, please refer to the <ahref="http://bloomberg.github.io/bucklescript/Manual.html">manual</a></p>
470
+
<p>We are pleased to announce a stable 1.0 release of BuckleScript, which covers the whole OCaml language (except some features highly coupled with runtime, like the Gc and Unix modules etc.).
471
+
To learn more about BuckleScript, please refer to <ahref="http://bloomberg.github.io/bucklescript/Manual.html">the user manual</a> and we welcome <ahref="https://github.com/bloomberg/bucklescript">your feedback</a>.</p>
Copy file name to clipboardExpand all lines: site/docsource/blog/index.adoc
+23-24Lines changed: 23 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -10,39 +10,38 @@ BuckleScript is an optimizing compiler which compiles http://ocaml.org/[OCaml]
10
10
into JavaScript module by module _without name mangling_. The generated code is _highly readable_ and _super small_,
11
11
see http://bloomberg.github.io/bucklescript/js-demo/[Hello world] example
12
12
and http://bloomberg.github.io/bucklescript/js-demo/#Use_JS_standard_Library_WIP[examples of calling JS libraries].
13
-
BuckleScript is strongly inspired by TypeScript and BabelJS, readability and easy integration with existing JS libraries are essential.
13
+
BuckleScript is strongly inspired by TypeScript, BabelJS - we consider _readability_and _easy integration with existing JS libraries_ to be essential.
14
14
15
-
However, there are a few things we believe we do it much better:
15
+
There are a few things we believe BuckleScript does better compared with TypeScript:
16
16
17
-
More type safety and more performant code generated::
18
17
19
-
BuckleScript does not invent a new language, it is OCaml. OCaml offers an industrial-strength
20
-
state-of-the-art type system and provides very strong type inference (i.e. No
21
-
verbose type annotation required compared with typescript), which proves
18
+
More type safe and more efficient code generated::
19
+
20
+
BuckleScript is not a new language, it is OCaml. OCaml offers an industrial-strength
21
+
state-of-the-art type system and provides very strong type inference (i.e. unlike TypeScript, no
22
+
verbose type annotation is required), which proves
22
23
http://queue.acm.org/detail.cfm?id=2038036[invaluable] in managing large projects. +
23
-
OCaml's type system is not just for tooling, it is a _sound_ type system which means it is guaranteed that there will
24
-
be no runtime type errors after type checking. Based on it, BuckleScript provide many optimizations during offline
25
-
compilation, see a simple benchmark https://github.com/bloomberg/bucklescript#bucklescript-ocaml-stdlib[here]
24
+
OCaml's type system is not just for tooling; it is a _sound_ type system which means it is guaranteed there will
25
+
be no runtime type errors after type checking. Based on this guarantee, BuckleScript provides many optimizations during offline
26
+
compilation. You can view a simple benchmark https://github.com/bloomberg/bucklescript#bucklescript-ocaml-stdlib[here]!
26
27
27
-
All the benefits of OCaml stay and a feature rich FFI::
28
+
All the benefits of OCaml with a feature rich and efficient FFI::
28
29
29
-
You program can be compiled into _native code_, _JS_ and even _unikernel_. The BuckleScript compiler will become even faster
30
-
thanks to https://blogs.janestreet.com/flambda/[more and more optimizations] in the upstream compiler. +
31
-
Thanks to OCaml's native support of Object structural type system, BuckleScript's FFI can model JS object natively.
32
-
Some powerful type system features like polymorphic variants and GADTs are also invaluable to model existing JS libraries. +
33
-
Unlike most language FFI, the design goal of http://bloomberg.github.io/bucklescript/Manual.html#_ocaml_calling_js[BuckleScript FFI] is to avoid writing any unsafe JS stubs code while remain the
34
-
native efficiency. We try to avoid any allocation for the FFI.
30
+
Your program can be compiled into _native code_, _JS_ and even a https://mirage.io/[unikernel]. The BuckleScript compiler is expected to become even faster and produce even faster code owing to https://blogs.janestreet.com/flambda/[more] and https://github.com/ocaml/ocaml/pull/606[more] optimizations in the upstream OCaml compiler. +
31
+
Thanks to OCaml's native support of the Object structural type system, BuckleScript's FFI(foreign function interface) can model JS objects natively.
32
+
Some powerful type system features like http://caml.inria.fr/pub/docs/manual-ocaml-400/manual006.html#toc36[polymorphic variants] and http://caml.inria.fr/pub/docs/manual-ocaml-400/manual021.html#toc85[GADTs] are also invaluable in modeling existing JS libraries. +
33
+
Unlike most language FFIs, the design goal of http://bloomberg.github.io/bucklescript/Manual.html#\_ocaml\_calling\_js[BuckleScript FFI] is to avoid writing any unsafe JS "stub" code with a performance cost. In particular, we try to _avoid any unnecessary memory allocations_ in the FFI.
35
34
36
-
Compilation speed is the key to developer experience::
35
+
Compilation speed is key to a good developer experience::
37
36
38
-
Our internal benchmark shows that BuckleScript is at least 10x faster than TypeScript,
39
-
there is no magic here: the BuckleScript compiler is written in OCaml which is
37
+
Our internal benchmarks shows that BuckleScript compiles at least 10x faster than TypeScript.
38
+
There is no magic here, the BuckleScript compiler is written in OCaml which is
40
39
compiled to blazing fast native code. +
41
-
However, it does not prevent the reach of BuckleScript compiler,
42
-
it is also compiled to a JS file (gzipped: 700KB for pure OCaml + 300KB for support of https://github.com/facebook/reason/[Reason]). +
43
-
http://bloomberg.github.io/bucklescript/js-demo/[The whole playground] is powered by the compiler compiled into JS, you can see it is still quite fast.
40
+
However, it does not limit the availability of BuckleScript compiler:
41
+
it is also compiled to a JS file (gzipped: 700KB for pure OCaml + 300KB for https://github.com/facebook/reason/[Reason] support). +
42
+
http://bloomberg.github.io/bucklescript/js-demo/[The playground] is powered by the compiler compiled to JS, which demonstrates a nearly real-time compilation speed, imagine how fast the native compiler would be.
44
43
45
44
46
45
47
-
BuckleScript reaches 1.0 now, it covers the whole OCaml language (except some features highly coupled with runtime, like Gc module, etc)
48
-
if you are interested in BuckleScript, please refer to the http://bloomberg.github.io/bucklescript/Manual.html[manual]
46
+
We are pleased to announce a stable 1.0 release of BuckleScript, which covers the whole OCaml language (except some features highly coupled with runtime, like the Gc and Unix modules etc.).
47
+
To learn more about BuckleScript, please refer to http://bloomberg.github.io/bucklescript/Manual.html[the user manual] and we welcome https://github.com/bloomberg/bucklescript[your feedback].
0 commit comments