Expert F# (eBook)

eBook Download: PDF
2008 | 1st ed.
XXVII, 609 Seiten
Apress (Verlag)
978-1-4302-0285-1 (ISBN)

Lese- und Medienproben

Expert F# - Antonio Cisternino, Adam Granicz, Don Syme
Systemvoraussetzungen
56,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

In this book, the world's foremost experts in F# show you how to program in F# the way they do. Written by F#'s inventor and two major contributors to its development, Expert F# is the authoritative, comprehensive, and in-depth guide to the language and its use. Designed to help others become experts, the first part of the book quickly yet carefully describes the F# language. The second part then carefully shows how to elegantly use F# for a wide variety of practical programming tasks. This comprehensive reference of F# concepts, syntax, and features offers a treasury of expert techniques.



Antonio Cisternino is a professor in the Computer Science Department of the University of Pisa. His primary research is on scientific computing, meta-programming and domain-specific languages on virtual-machine-based execution environments. He has been active in the .NET community since 2001 and developed VSLab, a Microsoft Visual Studio add-in to support MATLAB-like programming in F# and Visual Studio. He is also author of annotated C#, an extension of C#, and Robotics4.NET, a framework for programming robots with Microsoft .NET. Cisternino holds a Ph.D. in Computer Science from the University of Pisa.
Expert F# is about practical programming in a beautiful language that puts the power and elegance of functional programming into the hands of .NET developers. In combination with .NET, F# achieves unrivaled levels of programmer productivity and program clarity. This books serves as The authoritative guide to F# by the designer of F# A comprehensive reference of F# concepts, syntax, and features A treasury of expert F# techniques for practical, real world programming While inspired by OCaml, F# isn't just another functional programming language. Drawing on many of the strengths of both OCaml and .NET, it's a general purpose language ideal for real world development. F# integrates functional, imperative, and object oriented programming styles so you can flexibly and elegantly solve programming problems, and brings .NET development alive with interactive execution. Whatever your background, you'll find that F# is easy to learn, fun to use, and extraordinarily powerful. F# will help change the way you think about and go about programming. Written by F#'s designer and two active contributors, Expert F# is the authoritative, comprehensive, and in depth guide to the language and its use. Designed to help others become experts, the book gives a thorough introduction to the F# language from quick essentials to in depth advanced topics such as active pattern matching, aggregate data types and operators, sequence expressions, lazy values, mutable data and side effects, generics, type augmentations, functional decomposition and code organization. The second half of the book is devoted to examining the practical application of F#, providing elegant solutions to common programming tasks including user interface implementation, data access, web and distributed programming, symbolic and numerical computations, concurrent programming, testing, profiling, andinteroperability with other languages. The latest hot developments in F# and .NET are also addressed, including Active Patterns, implicit class construction, integration with LINQ over relational data, meta programming and useful tips for working with Visual Studio and F# command line tools. The worlds foremost experts in F# show you how to program in F# the way they do!

Antonio Cisternino is a professor in the Computer Science Department of the University of Pisa. His primary research is on scientific computing, meta-programming and domain-specific languages on virtual-machine-based execution environments. He has been active in the .NET community since 2001 and developed VSLab, a Microsoft Visual Studio add-in to support MATLAB-like programming in F# and Visual Studio. He is also author of annotated C#, an extension of C#, and Robotics4.NET, a framework for programming robots with Microsoft .NET. Cisternino holds a Ph.D. in Computer Science from the University of Pisa.

Contents at a Glance 5
Contents 6
Foreword 19
About the Authors 21
About the Technical Reviewer 22
Acknowledgments 23
Introduction 24
The Genesis of F# 24
About This Book 25
Who This Book Is For 28
Getting Started with F# and . NET 30
Creating Your First F# Program 30
Using . NET Libraries from F# 43
Summary 48
Introducing Functional Programming 49
Getting Started with F# Arithmetic 49
Introducing Simple Strings 53
Working with Lists and Options 56
Working with Conditionals: & &
Defining Recursive Functions 62
Introducing Function Values 64
Getting Started with Pattern Matching 73
Getting Started with Sequences 77
Using Sequence Expressions 81
Exploring Some Simple Type Definitions 84
Summary 90
Introducing Imperative Programming 91
Imperative Looping and Iterating 92
Using Mutable Records 94
Using Mutable Locals 98
Working with Arrays 99
Introducing the Imperative . NET Collections 102
Exceptions and Controlling Them 106
Having an Effect: Basic I/ O 110
Working with null Values 116
Some Advice: Functional Programming with Side Effects 117
Summary 122
Mastering Types and Generics 123
Understanding Generic Type Variables 123
Writing Generic Functions 124
Understanding Some Important Generic Functions 125
Making Things Generic 130
Understanding . NET Types 134
Understanding Subtyping 135
Troubleshooting Type Inference Problems 140
Summary 145
Working with Objects and Modules 146
Getting Started with Objects and Members 146
Using Constructed Classes 149
Adding Further Object Notation to Your Types 152
Defining Object Types with Mutable State 158
Getting Started with Object Interface Types 160
More Techniques to Implement Objects 165
Using Modules and Static Members 169
Extending Existing Types and Modules 171
Working with F# Objects and . NET Types 172
Summary 174
Encapsulating and Packaging Your Code 175
Hiding Things Away 176
Using Namespaces and Modules 181
Using Signature Types and Files 184
Creating Assemblies, DLLs, and EXEs 186
Packaging Applications 193
Summary 199
Mastering F#: Common Techniques 200
Equality, Hashing, and Comparison 200
Efficient Precomputation and Caching 203
Cleaning Up Resources 209
Stack As a Resource: Tail Calls and Recursion 217
Events and Wiring 226
Summary 229
Introducing Language-Oriented Programming 230
Using XML As a Concrete Language Format 231
Working with Abstract Syntax Representations 236
Introducing Active Patterns 243
Embedded Computational Languages with Workflows 249
Using F# Reflection 264
Using F# Quotations 268
Summary 273
Using the F# and . NET Libraries 274
A High- Level Overview 274
Using the System Types 278
Using Regular Expressions and Formatting 280
Using Further F# and . NET Data Structures 285
Introducing Microsoft. FSharp. Math 287
Supervising and Isolating Execution 289
Further Libraries for Reflective Techniques 289
Some Other . NET Types You May Encounter 291
Some Other . NET Libraries 292
Summary 293
Working with Windows Forms and Controls 294
Writing “ Hello, World!” in a Click 294
Understanding the Anatomy of a Graphical Application 295
Composing User Interfaces 296
Drawing Applications 301
Writing Your Own Controls 306
Displaying Samples from Sensors 310
Creating a Mandelbrot Viewer 322
Summary 334
Working with Symbolic Representations 335
Symbolic Differentiation and Expression Rendering 336
Verifying Circuits with Propositional Logic 356
Summary 371
Reactive, Asynchronous, and Concurrent Programming 372
Introducing Some Terminology 373
Using and Designing Background Workers 374
Introducing Asynchronous Computations 382
Passing and Processing Messages 396
Using Shared- Memory Concurrency 405
Summary 409
Building Web Applications 410
Serving Static Web Content 410
Serving Dynamic Web Content with ASP. NET 413
Using ASP. NET Input Controls 423
Displaying Data from Databases 426
Going Further with ASP. NET 429
Building Ajax Rich Client Applications 439
Using Web Services 441
Summary 446
Working with Data 447
Querying In-Memory Data Structures 447
Using Databases to Manage Data 452
Working with Databases in Visual Studio 466
Accessing Relational Data with F# LinqToSql 468
Working with XML As a Generic Data Format 471
Summary 475
Lexing and Parsing 476
Processing Line- Based Input 477
Tokenizing with FsLex 479
Recursive- Descent Parsing 488
Parsing with FsYacc 492
Binary Parsing and Pickling Using Combinators 501
Summary 504
Interoperating with C and COM 505
Common Language Runtime 505
Memory Management at Run Time 508
COM Interoperability 510
Platform Invoke 521
Summary 536
Debugging and Testing F# Programs 537
Debugging F# Programs 538
Debugging and Testing with F# Interactive 547
Unit Testing 551
Summary 557
Designing F# Libraries 558
Designing Vanilla . NET Libraries 559
Understanding Functional Design Methodology 564
Applying the . NET Design Guidelines to F# 567
Some Recommended Coding Idioms 573
Summary 575
F# Brief Language Guide 576
Index 583

Erscheint lt. Verlag 6.2.2008
Zusatzinfo XXVII, 609 p. 103 illus., 6 illus. in color.
Verlagsort Berkeley
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Software Entwicklung Objektorientierung
Schlagworte Boo • Class • C programming language • Debugging • F# • Functional Programming • LINQ • .NET • Objective CAML • OCaml • Processing • Programming language • SQL • Visual Studio • Windows Forms
ISBN-10 1-4302-0285-8 / 1430202858
ISBN-13 978-1-4302-0285-1 / 9781430202851
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 5,9 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Entwicklung von GUIs für verschiedene Betriebssysteme

von Achim Lingott

eBook Download (2023)
Carl Hanser Verlag GmbH & Co. KG
39,99
Grundlagen, Objektorientierung und fortgeschrittene Konzepte

von Christian Kohls; Alexander Dobrynin

eBook Download (2023)
Carl Hanser Verlag GmbH & Co. KG
39,99