Cargando…

Hands-On Functional Programming in Rust : Build modular and reactive applications with functional programming techniques in Rust 2018.

Functional programming allows developers to divide programs into smaller, reusable components that ease the creation and maintenance of software as a whole. Combining power of Rust, you can develop robust applications that fulfill modern day software requirements. This book will help you discover Ru...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Johnson, Andrew
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, 2018.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Functional Programming
  • a Comparison; Technical requirements; Reducing code weight and complexity; Making generics more generic; Functions as values; Iterators; Compact legible expressions; Strict abstraction means safe abstraction; Scoped data binding; Algebraic datatypes; Mixing object-oriented programming and functional programming; Improving project architecture; File hierarchy, modules, and namespace design; Functional design patterns; Metaprogramming; Summary; Questions.
  • Further readingChapter 2: Functional Control Flow; Technical requirements; Designing the program; Gathering project requirements; Architecting a code map from requirements; Creating a Rust project; Writing stubs for each program requirement; Implementing program logic; Filling in the blanks; Parsing input and storing as building description and floor requests; Updating location, velocity, and acceleration; If the next floor request in the queue is satisfied, then remove it from the queue; Adjusting motor control to process the next floor request; Printing real-time statistics.
  • Printing summaryBreaking down long segments into components; Searching for abstractions; Writing tests; Unit testing; Integration testing; Summary; Questions; Chapter 3: Functional Data Structures; Technical requirements; Adjusting to changing the scope of the project; Gathering new project requirements; Architecting a change map from requirements; Translating expectations into requirements; Translating requirements into a change map; Mapping requirements directly to code; Writing the physics simulator; Writing the motor controller; Writing the executable to run a simulation.
  • Writing the executable to analyze a simulationRunning simulations and analyzing data; Summary; Questions; Chapter 4: Generics and Polymorphism; Technical requirements; Staying productive during downtime; Learning about generics; Investigating generics; Investigating parametric polymorphism; Investigating generalized algebraic datatypes; Investigating parametric lifetimes; Defining lifetimes on ground types; Defining lifetimes on generic types; Defining lifetimes on traits; Defining lifetime subtyping; Investigating parametric types; Applying parameterization concepts; Parameterizing data.
  • Parameterizing functions and trait objectsParametric traits and implementations; Summary; Questions; Chapter 5: Code Organization and Application Architecture; Technical requirements; Shipping a product without sacrificing quality; Reorganizing the project; Planning content of files by type; Organizing the motor_controllers.rs module; Organizing the buildings.rs module; Planning content of files by purpose; Organizing the motion_controllers.rs module; Organizing the trip_planning.rs module; Organizing the elevator_drivers.rs module; Planning content of files by layer.