Book description
Learn from F#'s inventor to become an expert in the latest version of this powerful programming language so you can seamlessly integrate functional, imperative, object-oriented, and query programming style flexibly and elegantly to solve any programming problem. Expert F# 4.0 will help you achieve unrivaled levels of programmer productivity and program clarity across multiple platforms including Windows, Linux, Android, OSX, and iOS as well as HTML5 and GPUs.
F# 4.0 is a mature, open source, cross-platform, functional-first programming language which empowers users and organizations to tackle complex computing problems with simple, maintainable, and robust code.
Expert F# 4.0 is:
Written by F#'s inventor and two major F# community members, Expert F# 4.0 is a comprehensive and in-depth guide to the language and its use. Designed to help others become experts, the book quickly yet carefully describes the paradigms supported by F# language, and then shows how to use F# elegantly for a practical web, data, parallel and analytical programming tasks.
The world's experts in F# show you how to program in F# the way they do!
Table of contents
- Cover
- Title
- Copyright
- Contents at a Glance
- Contents
- About the Authors
- About the Technical Reviewers
- Acknowledgments
- Chapter 1: Introduction
- Chapter 2: Your First F# Program: Getting Started with F#
-
Chapter 3: Introducing Functional Programming
- Starting with Numbers and Strings
- Working with Conditionals: & and ||
- Defining Recursive Functions
- Lists
- Options
- Getting Started with Pattern Matching
-
Introducing Function Values
- Using Function Values
- Computing with Collection Functions
- Using Fluent Notation on Collections
- Composing Functions with >>
- Building Functions with Partial Application
- Using Local Functions
- Iterating with Functions
- Abstracting Control with Functions
- Using Object Methods as First-Class Functions
- Some Common Uses of Function Values
- Summary
-
Chapter 4: Introducing Imperative Programming
- About Functional and Imperative Programming
- Imperative Looping and Iterating
- Using Mutable Records
- Using Mutable let Bindings
- Working with Arrays
- Introducing the Imperative .NET Collections
- Exceptions and Controlling Them
- Having an Effect: Basic I/O
- Combining Functional and Imperative Efficient Precomputation and Caching
- Combining Functional and Imperative: Functional Programming with Side Effects
- Summary
- Chapter 5: Understanding Types in Functional Programming
-
Chapter 6: Programming with Objects
- Getting Started with Objects and Members
- Using Classes
- Adding Further Object Notation to Your Types
- Defining Object Types with Mutable State
- Getting Started with Object Interface Types
- More Techniques for Implementing Objects
- Combining Functional and Objects: Cleaning Up Resources
- Extending Existing Types and Modules
- Working with F# Objects and .NET Types
- Summary
- Chapter 7: Encapsulating and Organizing Your Code
- Chapter 8: Working with Textual Data
- Chapter 9: Working with Sequences and Tree-Structured Data
- Chapter 10: Numeric Programming and Char?ting
-
Chapter 11: Reactive, Asynchronous, and Parallel Programming
- Introducing Terminology
- Events
-
Asynchronous Computations
- Fetching Multiple Web Pages in Parallel, Asynchronously
- Understanding Asynchronous Computations
- Example: Parallel File Processing Using Async Computations
- Running Async Computations
- Common I/O Operations in Asynchronous Computations
- Understanding Exceptions and Cancellations
- Interoperating with .NET Tasks
- Agents
- Example: An Asynchronous Agent for Web Crawling
- Using Shared-Memory Concurrency
- Summary
- Chapter 12: Symbolic Programming with Structured Data
- Chapter 13: Integrating External Data and Services
-
Chapter 14: Building Smart Web Applications
- Serving Web Content Directly
-
Rich Client Web Applications with WebSharper
- Getting Started with WebSharper
- Pagelets - Working with Reactive HTML and Client-Side Code
- HTML Templates
- Sitelets
- Developing REST Applications
- Formlets and Piglets: Building Functional Web Forms
- Automated Resource Tracking and Handling
- Using Third-Party JavaScript Libraries
- Working with .NET Proxies
- Summary
-
Chapter 15: Visualization and Graphical User Interfaces
- Getting Started with Eto
- Writing “Hello, World!” in a Click
- Understanding the Anatomy of a Graphical Application
- Composing Controls and Menus
- Composing User Interfaces
- Drawing Applications
- Creating a Mandelbrot Viewer
- Writing Your Own Controls
- The World, the View, and Coordinate Systems
- Lightweight Controls
- Summary
-
Chapter 16: Language-Oriented Programming
-
Computation Expressions
- An Example: Success/Failure Computation Expressions
- Defining a Computation-Expression Builder
- Computation Expressions and Untamed Side Effects
- Computation Expressions with Custom Query Operators
- Example: Probabilistic Computations
- Combining Computation Expressions and Resources
- Recursive Workflow Expressions
- Using F# Reflection
- Using F# Quotations
- Writing an F# Type Provider
- Summary
-
Computation Expressions
-
Chapter 17: Libraries and Interoperability
- Types, Memory, and Interoperability
- Libraries: A High-Level Overview
- Using the System Types
- Using Further F# and .NET Data Structures
- Supervising and Isolating Execution
- Further Libraries for Reflective Techniques
- Under the Hood: Interoperating with C# and Other .NET Languages
- Interoperating with C and C++ with PInvoke
- Summary
- Chapter 18: Developing and Testing F# Code
-
Chapter 19: Designing F# Libraries
- Designing Vanilla .NET Libraries
- Understanding Functional-Design Methodology
-
Applying the Good Library Design to F#
- Recommendation: Use Correct Naming and Capitalization Conventions Where Possible
- Recommendation: Avoid Using Underscores in Names
- Recommendation: Follow the Recommended Guidelines for Exceptions
- Recommendation: Consider Using Option Values for Return Types Instead of Raising Exceptions
- Recommendation: Follow the Recommended Guidelines for Value Types
- Recommendation: Consider Using Explicit Signature Files for Your Framework
- Recommendation: Consider Avoiding the Use of Implementation Inheritance for Extensibility
- Recommendation: Use Properties and Methods for Attributes and Operations Essential to a Type
- Recommendation: Avoid Revealing Concrete Data Representations Such as Records
- Recommendation: Use Active Patterns to Hide the Implementations of Discriminated Unions
- Recommendation: Use Object-Interface Types Instead of Tuples or Records of Functions
- Recommendation: Understand When Currying Is Useful in Functional Programming APIs
- Recommendation: Use Tuples for Return Values, Arguments, and Intermediate Values
- Recommendation: Use Async for Asynchronous Computations
- Recommendation: Use Choice or a Named Type for Alternative Results
- Some Recommended Coding Idioms
- Summary
-
Appendix: F# Brief Language Guide
- Comments and Attributes
- Basic Types and Literals
- Types
- Patterns and Matching
- Functions, Composition, and Pipelining
- Binding and Control Flow
- Exceptions
- Tuples, Arrays, Lists, and Collections
- Operators
- Type Definitions and Objects
- Namespaces and Modules
- Sequence Expressions and Workflows
- Queries and Quotations
- Index
Product information
- Title: Expert F# 4.0, Fourth Edition
- Author(s):
- Release date: December 2015
- Publisher(s): Apress
- ISBN: 9781484207406
You might also like
book
Beginning F# 4.0
This book is a great foundation for exploring functional-first programming and its role in the future …
book
Programming F# 3.0, 2nd Edition
Why learn F#? With this guide, you’ll learn how this multi-paradigm language not only offers you …
book
Visual Cryptography and Secret Image Sharing
With rapid progress in Internet and digital imaging technology, there are more and more ways to …
video
GenAI Essentials for Everyone - Overview
Our team of experts has hand-selected and organized the most crucial concepts and practical applications of …