Web Development with ReasonML: Type-Safe, Functional Programming for JavaScript Developers

Eisenberg, J. David

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2019-04-30
  • 定價: $1,560
  • 售價: 9.5$1,482
  • 語言: 英文
  • 頁數: 208
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1680506331
  • ISBN-13: 9781680506334
  • 相關分類: JavaScript
  • 立即出貨 (庫存 < 4)

相關主題

商品描述

ReasonML is a new, type-safe, functional language that compiles to efficient, readable JavaScript. ReasonML interoperates with existing JavaScript libraries and works especially well with React, one of the most popular front-end frameworks. Learn how to take advantage of the power of a functional language while keeping the flexibility of the whole JavaScript ecosystem. Move beyond theory and get things done faster and more reliably with ReasonML today.

ReasonML is a new syntax for OCaml, a battle-tested programming language used in industry for over 20 years. Designed to be familiar to JavaScript programmers, ReasonML code compiles to highly readable JavaScript. With ReasonML, you get OCaml's powerful functional programming features: a strong static type system with an excellent type inference engine, pattern matching, and features for functional programming with immutable variables. ReasonML also allows flexibility with opt-in side effects, mutation, and object-oriented programming. ReasonML hits the sweet spot between the pure theoretical world and the laissez-faire approach of JavaScript.

Start using ReasonML's powerful type system as you learn the essentials of the language: variables and arithmetic operations. Gain expressive power as you write functions with named parameters and currying. Define your own data types, and integrate all these capabilities into a simple web page. Take advantage of ReasonML's functional data structures with map and reduce functions. Discover new ways to write algorithms with ReasonML's recursion support. Interoperate with existing JavaScript libraries with bindings, and write reactive web applications using ReasonML in tandem with React. Reinforce concepts with examples that range from short, tightly focused functions to complete programs, and practice your new skills with exercises in each chapter.With ReasonML, harness the awesome power of a functional language while retaining the best features of JavaScript to produce concise, fast, type-safe programs.

What You Need:

You'll need to have node.js (version 10.0 or above) and npm (version 5.6 or above). Once you install the bs-platform package and fire up a text editor, you're ready to go. (There are plugins for many popular editors that will make editing easier.)

商品描述(中文翻譯)

ReasonML是一種新的、類型安全的函數式語言,可以編譯成高效且易讀的JavaScript。ReasonML與現有的JavaScript庫互通,尤其適用於React,這是一個最受歡迎的前端框架之一。學習如何在保持整個JavaScript生態系統的靈活性的同時,充分利用函數式語言的威力。超越理論,立即使用ReasonML更快、更可靠地完成工作。

ReasonML是OCaml的一種新語法,OCaml是一種經過20多年工業實踐驗證的編程語言。ReasonML的設計目標是讓JavaScript程序員感到熟悉,ReasonML代碼編譯成高度可讀的JavaScript。使用ReasonML,您可以獲得OCaml強大的函數式編程功能:強大的靜態類型系統,優秀的類型推斷引擎,模式匹配以及用於函數式編程的特性,如不可變變量。ReasonML還允許靈活地選擇性地使用副作用、變異和面向對象編程。ReasonML在純理論世界和JavaScript的放任自流之間找到了最佳平衡點。

在學習語言的基礎知識(變量和算術操作)的同時,使用ReasonML的強大類型系統。通過使用具有命名參數和柯里化的函數,增加表達能力。定義自己的數據類型,並將所有這些功能集成到一個簡單的網頁中。利用ReasonML的函數式數據結構以及map和reduce函數。通過ReasonML的遞歸支持,發現編寫算法的新方法。使用綁定與現有的JavaScript庫互通,並使用ReasonML與React一起編寫反應式網絡應用程序。通過範例加深概念,這些範例從短小而緊密的函數到完整的程序不等,並在每個章節中通過練習來練習新技能。使用ReasonML,利用函數式語言的強大威力,同時保留JavaScript的最佳特性,產生簡潔、快速、類型安全的程序。

所需工具:
您需要安裝node.js(版本10.0或以上)和npm(版本5.6或以上)。一旦安裝了bs-platform包並啟動了文本編輯器,您就可以開始使用了。(許多常用編輯器都有插件可以使編輯更加方便。)

作者簡介

J. David Eisenberg is a programmer and instructor at Evergreen Valley College in San Jose, California. He is co-author of several books on programming technology (SVG, Elixir, Erlang, and ClojureScript). David's interest in foreign languages has led him to write online tutorials for Korean, Modern Greek, and Russian.He is also a cat person.

作者簡介(中文翻譯)

J. David Eisenberg是加州聖荷西Evergreen Valley College的程式設計師和講師。他是幾本關於程式設計技術(SVG、Elixir、Erlang和ClojureScript)的合著者。David對外語的興趣使他撰寫了韓語、現代希臘語和俄語的線上教程。他也是一個愛貓人士。