Partager via


New drafts of chapters from "Expert F#"

I'm very glad to announce the availability of drafts of Chapters 2-7 of Expert F#, of a book on F# which I'm currently in the process of co-authoring (thanks to James Huddleston at Apress for permission to post these).  This is one of two F# books planned for publication by Apress in 2007, the other being Foundations of F# by Robert Pickering, which I'm proudly helping to tech-review. Enjoy!

Chapter 2: Getting Started with F# and .NET

Chapter 3: Introducing Functional Programming

Chapter 4: Imperative Programming with F#

Chapter 5: Mastering Types and Generics (partial draft)

Chapter 6: Type Definitions, Classes and Objects

Chapter 7: Namespaces, Modules and Signatures (partial draft)

I've also posted two very preliminary documents which beginners may also find interesting, though the material should not be taken as absolutely authoritative.

Preliminary Code Formatting Guidelines

Preliminary Coding Convention Guidelines

I trust you will find this a useful resource for learning F# - it has been favourably received by people at MSR Cambridge. We'll update the drafts for minor fixes, though of course the final version will be available in the book.  This is only a draft that has not undergone formal technical or copy editing, so please just ignore egregious mistakes and be patient with poor formatting and dangling symbolic cross-references (for various reasons Apress do not use Word cross-referencing and prefer to do it later in the production process).  Finally, some Word comments indicate where discrepancies exist with the current F# release.

Comments

  • Anonymous
    December 18, 2006
    [ Note: this post is now out-of-date: drafts of Chapters 2-7 are now available ] I'm very glad to announce

  • Anonymous
    December 18, 2006
    Many thanks for this pre-Xmas gift! Regards

  • Anonymous
    December 18, 2006
    Awesome! Thanks for this nice X'mas present.

  • Anonymous
    December 19, 2006
    Don Syme's WebLog on F# and Other Research Projects has three recent entries on F# which I would like

  • Anonymous
    December 20, 2006
    Good stuff Don. One question: is it too late to provide feedback on these chapters? While you ask us to "just ignore egregious mistakes " I, like a lot of programmers, just love offering criticism and generally pointing out flaws in the work of people who are much cleverer than myself. Would it be inappropriate to email you (or someone) with feedback on paragraphs here or there? Have a good xmas.

  • Anonymous
    December 22, 2006
    Hi LB, please do send the comments along to my email, dsyme / AT / microsoft / DOT / com. don

  • Anonymous
    December 30, 2006
    The comment has been removed

  • Anonymous
    January 09, 2007
    Is there a hint on the table of contents anywhere? I'd like to have a sense of the chapters-to-be.

  • Anonymous
    January 25, 2007
    Here is the proposed TOC - let us know what you think! Cheers don Part I. The Language Chapter 1. Introduction Chapter 2. Getting Started with F# and .NET Chapter 3. Introducing Functional Programming Chapter 4. Imperative Programming Chapter 5. Mastering Types and Generics Chapter 6. Type Definitions, Classes, and Objects Chapter 7. Namespaces, Modules, and Signatures Chapter 8. Mastering F#:Common Techniques Chapter 9. Handling I/O Part II. Applied Topics Chapter 10. Windows Forms and Controls Chapter 11. Symbolic Manipulation Chapter 12. Graphics, Sound, and Text Chapter 13. Numerical Programming Chapter 14. Concurrent Programming Chapter 15. Web Programming Chapter 16. SQL and XML Processing Chapter 17.  Lexing and Parsing Chapter 18. Interoperating with C and COM Chapter 19. Testing F# Code Chapter 20. F# Coding Conventions Appendixes Appendix A. F# Syntax Appendix B. The F# Library Appendix C. F# in One Page Appendix D. Glossary

  • Anonymous
    January 30, 2007
    F# updates have slowed down recently...are we to expect a big, juicy, update soon?

  • Anonymous
    February 01, 2007
    Hi falcon, A big new release is indeed coming soon: we'll start blogging about it shortly.  We also took a bit of well-earned a break over Christmas! Cheers! don

  • Anonymous
    February 11, 2007
    By the way, chapter 10 refers to Windows forms...I hope you concentrate on WPF.  I also hope that you expand on "Imperative Reactive Programming," perhaps something like frtime, yampa, etc.  I hope you release rest of the book as draft chapters within the next couple of weeks so I can do a demo at work ;)

  • Anonymous
    February 15, 2007
    Chapter 4: Imperative Programming with F# Page 14: let sum n m =    let mutable res = 0    for i = n to m do        res <- res + n /// Is it i instead of n?    res

  • Anonymous
    February 18, 2007
    Hi Don, I'm really enjoying learning F# (and using what I learn on 'downstream' ;-) languages like C# 3 and C# 2) - is the book still on target re its publish date? Having enjoyed the 7 odd chapters you've kindly posted so far I look at the TOC and well... drool. Thanks for the awesome language. Kind regards, .tom

  • Anonymous
    May 10, 2007
    My URL is intranet so not available but I am creating a blog on learning this language (know all types of commercial languages so far only) because I find it beautiful and I can already see that features are flowing from this language (or functional languages) into other languages, not only C++, C# and VB.NET... Java is coming out with F3!!!!!

  • Anonymous
    May 12, 2007
    Ch3: Introducing Functional Programming In section 'Defining Recursive Functions' (right after the badFactorial example ;-)) I guess:  let rec even n = (n = 0) or not(odd(n-1))  and     odd  n = not(even(n-1)) should be:  let rec even n = (n = 0) or not(odd(n-1))  and     odd  n = (n = 0) or not(even(n-1))

  • Anonymous
    September 13, 2007
    The poster is right: "even 1" would not terminate.  But it is clearer this way: let rec even n = (n = 0) or not(not_odd(n-1)) and not_odd n = (n = 0) or not(even(n-1)); It's like Bill & Ted's Bogus Journey: not not not not excellent. Here is another possibility: let rec even n = (n = 0) || odd(n-1) and    odd n = (n <> 0) && even(n-1);