Skip to content
Sandny Blog
  • Home
  • Java
  • JavaScript
  • AWS
  • Embedded
  • About
Why did Facebook pick OCaml? OCaml

Why did Facebook pick OCaml?

  • December 18, 2018January 18, 2020
  • by Coder Kai

Facebook developed Flow, Hack, Infer, Pfff, and Reason using OCaml. And 50 % of the web version of Facebook Messenger has converted to Reason which lets you write simple, fast and quality type safe code while leveraging both the JavaScript & OCaml.

Due to the functional behaviour of OCaml, it helps to quickly adapt changing market conditions and go from prototypes to production systems with less effort.

The biggest reason behind facebook use OCaml is, it has support for defining own datatypes and the pattern matching on them.

OCaml is a functional language, with great support for first-class functions and immutable data structures. Similarly to the above, when you’re doing type checking, you end up doing a lot of different kinds of maps and folds over Abstract syntax tree nodes, and functional languages express that really concisely.

Hack

Hack is a compiler for a variant of PHP that aims to reconcile the fast development cycle of PHP with the discipline provided by static typing. 

Flow

Flow is a similar to Hack that provides static type checking for Javascript. Flow improves productivity by making you code faster, smarter. Both systems are highly responsive, use the same model for multithreading that can incorporate source code changes in real-time.

Infer

Infer is another static code analysis tool developed by Facebook along with open-source contributors. Infer used to check for null pointer exceptions, resource leaks, annotation reachability, missing lock guards, and concurrency race conditions in Android and Java code. This helps to identify critical bugs before product released to the production environment and help to identify crashes or poor performance.

Piff

Pfff is a tool for APIs, to perform static analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code. Piff used for C, Java, Javascript and PHP.

Reason

Reason is also known as ReasonML. It is a syntax extension and toolchain for OCaml. Reason offers a syntax familiar to JavaScript programmers.

AppSync GraphQL Web App with AWS Amplify and IAM Authentication
OCaml
Coder Kai
A humble developer
OCaml

Related articles

OCaml data structures
OCaml Data Structures
OCaml
OCaml

Categories

  • android 3
  • Apollo Client 1
  • AWS 8
    • AppSync 5
    • EC2 1
    • EKS 1
    • Route53 1
    • S3 1
  • AWS Amplify 1
  • Chakra UI 1
  • Docker 1
  • Embedded 1
  • EmberJS 1
  • FCM 1
  • Godaddy 1
  • GraphQL 3
  • ios 1
  • Jasper 1
  • Java 10
    • Java 11 1
    • Java 14 1
  • JavaEE 2
  • JavaScript 39
    • Express.js 4
    • Javascript Guide 7
    • Node.js 3
    • react-native 4
    • React.js 17
    • Typescript 1
  • Kubernetes 1
  • machine learning 1
  • Maven 2
  • OCaml 3
  • PostgreSQL 1
  • Python 2
  • react-native 4
  • ReactJS 3
  • sass 1
  • Server 6
  • spark 1
  • Terraform 2
  • Ubuntu 4
  • Uncategorized 1
  • webpack 2

Recent Comments

  • binance register on Chakra UI Animations
  • binance account on SSL Websocket proxy with Nginx for Graphql Subscriptions
  • Binance Pag-signup on How to fetch data with useEffect

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

  • October 2022 3
  • September 2022 7
  • May 2022 1
  • December 2021 1
  • August 2021 1
  • July 2021 6
  • June 2021 3
  • February 2021 1
  • July 2020 1
  • December 2019 5
  • November 2019 6
  • October 2019 3
  • August 2019 1
  • March 2019 1
  • February 2019 1
  • January 2019 2
  • December 2018 1
  • September 2018 2
  • August 2018 1
  • June 2018 1
  • February 2018 1
  • November 2017 2
  • October 2017 5
  • September 2017 1
  • June 2017 1
  • May 2017 10
Sandny Blog space
Theme by Colorlib Powered by WordPress