• Complain

Danny Yang - Introducing ReScript: Functional Programming for Web Applications

Here you can read online Danny Yang - Introducing ReScript: Functional Programming for Web Applications full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2022, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Danny Yang Introducing ReScript: Functional Programming for Web Applications
  • Book:
    Introducing ReScript: Functional Programming for Web Applications
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2022
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Introducing ReScript: Functional Programming for Web Applications: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Introducing ReScript: Functional Programming for Web Applications" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

This book serves as a succinct guide on ReScript, a functional language for building web applications. Using examples of ReScript language features along with explanations of fundamental concepts in functional programming, this book will show web developers with a background in JavaScript how to effectively use ReScript to its full potential.
In Introducing ReScript, youll learn how to use features in ReScript that JavaScript lacks, such as type inference, null-safety, algebraic data types, pattern matching, and more. Along the way, youll pick up functional programming concepts like immutability and higher-order functions. Youll also gain a sense of how ReScript works under the hood and how to leverage interoperability between ReScript and JavaScript.
Whether youre a web developer interested in dabbling with functional programming or you just want to learn how to write safer and cleaner code for web applications, this book is a great way for you to get started with ReScript.
What You Will Learn
  • Use ReScript to write clean, safe, and elegant software
  • Understand the features of ReScript that set it apart from JavaScript, such as type inference, null-safety, and algebraic data types
  • Explore functional programming concepts like immutabhigher-orderr order functions, and pattern matching
  • Use popular JavaScript libraries and frameworks in your ReScript code and integrate ReScript code into JavaScript codebases

  • Who This Book Is For
    Web developers that want a strictly typed, safer alternative to JavaScript, as well as web developers interested in learning functional programming and leveraging the elegant and powerful functional features in ReScript.

    Danny Yang: author's other books


    Who wrote Introducing ReScript: Functional Programming for Web Applications? Find out the surname, the name of the author of the book and a list of all author's works by series.

    Introducing ReScript: Functional Programming for Web Applications — read online for free the complete book (whole text) full work

    Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Introducing ReScript: Functional Programming for Web Applications" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

    Light

    Font size:

    Reset

    Interval:

    Bookmark:

    Make
    Contents
    Landmarks
    Book cover of Introducing ReScript Danny Yang Introducing ReScript - photo 1
    Book cover of Introducing ReScript
    Danny Yang
    Introducing ReScript
    Functional Programming for Web Applications
    The Apress logo Danny Yang Mountain View CA USA ISBN 978-1-4842-8887-0 - photo 2

    The Apress logo.

    Danny Yang
    Mountain View, CA, USA
    ISBN 978-1-4842-8887-0 e-ISBN 978-1-4842-8888-7
    https://doi.org/10.1007/978-1-4842-8888-7
    Danny Yang 2023
    This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
    The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
    The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

    This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.

    The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.

    Introduction
    Why Learn ReScript?

    JavaScript is vital to the modern web ecosystem. Its used in the front end to implement websites and other user interfaces, and used in the back end to implement servers for websites and APIs.

    Part of JavaScripts ubiquity is due to its ease of use. JavaScript is dynamic and flexible, making it easy for people to pick up. However, this strength becomes a weakness when working on large web applications with multiple developers the only way to know that JavaScript code works correctly is to actually run it, and its relatively easy to make mistakes when programming in JavaScript.

    What if there was a way to detect bugs in JavaScript before running the code, or prevent many classes of bugs altogether? What if there was a language that was concise and elegant that made it easy for programmers to write complex web applications and hard for programmers to make mistakes?

    Enter ReScript.

    ReScript is a language designed for writing web applications. It brings a lot to the table: static typechecking, a strong type system, and powerful language features that will change the way you program.

    Heres a glimpse of some of the features that make ReScript a great language:
    • Static typechecking Catch bugs in your code without having to run it: undefined values, missing cases, incorrect types, and more.

    • Sound type system ReScript programs that pass typechecking cannot have runtime type errors.

    • Type inference ReScript automatically infers types based on how variables are used, allowing you to enjoy the benefits of type safety without having to annotate every variable and function.

    • Immutability Peace of mind while you program with variables and data structures that cannot be unexpectedly modified under your nose.

    • Algebraic data types and pattern matching Cleanly define and elegantly manipulate complex data.

    • First-class bindings for React Write React elements and JSX directly inside ReScript files.

    There are a number of other languages and tools that offer static typechecking for web applications, but ReScript has several key advantages over its competitors. As an example, lets look at the benefits ReScript has compared with another popular JavaScript alternative, TypeScript:
    • ReScript is safer Unlike ReScripts battle-tested and sound type system, TypeScripts type system is unsound, so it is still possible to have runtime type errors in a valid TypeScript program.

    • ReScript is faster ReScripts compiler is much faster than TypeScripts compiler, allowing for a smoother development experience when working in large code bases.

    • ReScript is more concise ReScripts excellent type inference means that programmers do not have to write as many type annotations in ReScript programs compared to TypeScript programs.

    Although ReScript is a relative newcomer to the web ecosystem, its actually based on technology that has been battle-tested for years before ReScript even existed. ReScript itself has proven successful as well. Most notably, Facebook used it to build the web interface for Messenger a product used by hundreds of millions of people with a code base containing thousands of files.

    History of ReScript

    The lineage of ReScript can ultimately be traced back to the ML family of languages originating from the 1960s. In particular, ReScript is directly based on OCaml, a general-purpose programming language that was developed in the 1980s and used today for systems programming in academia and industry.

    In 2015, Jordan Walke, the creator of the React web framework, developed a toolchain and alternative syntax for OCaml called Reason.

    Reason was designed to bridge the gap between the web and OCaml ecosystems it could be compiled into both native machine code and JavaScript, allowing web developers to take advantage of OCamls features. Static typechecking and OCamls sound type system eliminated many common bugs in JavaScript code, and OCamls immutability and functional style was a great fit for React.

    Reason was compiled to JavaScript using a compiler called BuckleScript, which was developed at Bloomberg around the same time Reason was being created at Facebook.

    Around 2020, the BuckleScript project created a new language based on Reason that could only be compiled to JavaScript using the BuckleScript compiler, and so ReScript was born.

    ReScript has the following key differences from its predecessors:
    • ReScript has different syntax and features. While it looks and feels more like JavaScript, ReScript is still based on the battle-tested compiler and type system as Reason and OCaml, so it has the same type safety benefits as its predecessors.

    • ReScript can only be compiled to JavaScript. By dropping support for native compilation, ReScript has a simpler toolchain and standard library, along with a feature set better suited for web development. This makes ReScript easier for newcomers to learn and allows for smoother integration with other web technologies.

    ReScript and the Web Ecosystem

    Like some other statically typed languages in the web ecosystem, ReScript code is transpiled to JavaScript. This means that ReScript code doesnt directly run in the browser or on the server. Instead, the ReScript compiler checks that the code is valid and generates JavaScript files, which can then be imported and used like any handwritten JavaScript file.

    Next page
    Light

    Font size:

    Reset

    Interval:

    Bookmark:

    Make

    Similar books «Introducing ReScript: Functional Programming for Web Applications»

    Look at similar books to Introducing ReScript: Functional Programming for Web Applications. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


    Reviews about «Introducing ReScript: Functional Programming for Web Applications»

    Discussion, reviews of the book Introducing ReScript: Functional Programming for Web Applications and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.