F# and its 11 features Guanru Li 2011 ACM class. F# is …... a programming language.

Slides:



Advertisements
Similar presentations
Slide 1 (15) 26 January 2007 Finding the Right Test Manager version 1.1 © SOFTWARE QUALITY CENTRE bbjTest Finding the Right Test Manager.
Advertisements

Basic Java Constructs and Data Types – Nuts and Bolts
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 14 Functional Programming It is better to.
CS4026 Formal Models of Computation Running Haskell Programs – power.
Yaser Zhian Dead Mage IGDI, Workshop 10, May 30 th -31 st, 2013.
Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.
Numerical Recipes The Art of Scientific Computing (with some applications in computational physics)
+ CS1001. Python. November 14 th, Scripting languages Scripting languages foster an exploratory, incremental approach to writing code Historically.
PROGRAMMING In. STARTER Using the internet…Find … what does case sensitive mean what a programming language is.. 3 benefits of Python.
An Introduction to Programming General Concepts. What is a program? A program is an algorithm expressed in a programming language. programming language.
Introduction to Compilation of Functional Languages Wanhe Zhang Computing and Software Department McMaster University 16 th, March, 2004.
Overview of programming in C C is a fast, efficient, flexible programming language Paradigm: C is procedural (like Fortran, Pascal), not object oriented.
By: Nathan C.. C++ is a multi-paradigm programming language with many usages(will be explained in usage slide), and is favored by some and criticized.
Control Structures Selections Repetitions/iterations
Presented by Julian Togashi & Ryan Lewis CPSC 476, CSUF.
The open source ecosystem for technical computing Alan Edelman Mathematics Computer Science & AI Laboratories May 15, 2014.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 26: Proving Uncomputability Visualization.
Introduction to OCaml Slides prepared by Matt Gruskin Some material borrowed from the CIS 500 lecture notes.
... a programming language. ...a functional programming language.
CS1022 Computer Programming & Principles
Class Diagrams Version 1.1 of : added learning objectives and DuckTestApp Version 1.2 of : added slide 6 on default values in UML Version.
Air Force Institute of Technology Electrical and Computer Engineering
Class 15 - Overhead 11Object Oriented Programming Using C #define t_circle 1 #define t_rectangle 2 struct circle_shape {short type; double x,y; double.
1 Smart Software with F# Joel Pobar Language Geek
Lab1 Lab 1: CSG 711: Programming to Structure Karl Lieberherr.
Programovací jazyky F# a OCaml Chapter 3. Composing primitive types into data.
By Neng-Fa Zhou Functional Programming 4 Theoretical foundation –Church’s -calculus expressions and evaluation rules 4 Characteristics –Single assignment.
F# Shiva Srivastava David He Peter Bingel. Overview F# (pronounced "F sharp") is a functional and object oriented programming language for the Microsoft.NET.
Functional Programing Referencing material from Programming Language Pragmatics – Third Edition – by Michael L. Scott Andy Balaam (Youtube.com/user/ajbalaam)
An introduction to F# Bogdan Brinzarea-Iamandi Banca Romaneasca 22 February 2010.
Floating Point Numbers Expressions Scanner Input Algorithms to Programs Shirley Moore CS 1401 Spring 2013 February 12, 2013.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
Robert Vitolo CS474.  Branched off of ML (metalanguage)  Developed at Microsoft, available as part of the Visual Studio 2010 software package, integrated.
Functional Programming With examples in F#. Pure Functional Programming Functional programming involves evaluating expressions rather than executing commands.
Georgia Institute of Technology Manipulating Pictures, Arrays, and Loops Barb Ericson Georgia Institute of Technology August 2005.
Animation Liveliness Simulation of motions A video made from a series of drawings/images simulating motions by means of slight progressive changes.
Programovací jazyky F# a OCaml Chapter 6. Sequence expressions and computation expressions (aka monads)
PROGRAMMING LANGUAGES: PROLOG, CLOJURE, F# Jared Wheeler.
Language Oriented Programming in F# Robert Pickering, Chance Coble, Roger Castillo.
Java8 Released: March 18, Lambda Expressions.
Functional Programming IN NON-FUNCTIONAL LANGUAGES.
An Introduction to F# Sushant aboutdev.com
Shapes and Patterns 1 st Grade ELL SHAPES What shape am I? I am a square.
Generic Programming and Library Design Brian Bartman
Cs776 (Prasad)L2HOF1 Higher-Order Functions. cs776 (Prasad)L2HOF2 Higher-Order Functions A function that takes a function as argument and/or returns a.
Phillip Trelford 1. Goals Introduce F# Non-goals Cover every language feature Mass conversion to FP cult Sell books 2.
Introduction to Functional Programming Part 1 – The Basic Concepts Winter Young
C# Diline Giriş.
CS 341 : Programming Languages
PROGRAMMING LANGUAGES
PROGRAMMING PARADIGMS
An Introduction to Programming
Microsoft .NET 3. Language Innovations Pan Wuming 2017.
Evolution of programming languages
3. .NET for Data Science and AI
Lecturer: Mukhtar Mohamed Ali “Hakaale”
.NET and .NET Core: Languages, Cloud, Mobile and AI
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
DotnetConf 11/19/2018 6:01 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
Functional Programming
Review for Midterm Exam
MediaScripting: Media Computation at Grinnell
Review for Midterm Exam
Review for Midterm Exam
Review for Midterm Exam
Review for Midterm Exam
Overview of Programming Paradigms
An Introduction to Programming
An Overview of C.
C# Language & .NET Platform 3rd Lecture
Presentation transcript:

F# and its 11 features Guanru Li 2011 ACM class

F# is …... a programming language.

F# is …... a functional programming language

F# is …... a functional programming language for.NET

F# is …... a functional and object oriented programming language for.NET

F# is …... a functional, object oriented and imperative programming language for.NET

F# is …... a multi-paradigm programming language for.NET

F# is …...a multi-paradigm programming language for.NET, ideally suited for technical, symbolic and algorithmic applications

F#

Why named F#? ► C# ► Functional programming

Hello F#, Hello n factorial printfn "Hello F#!“ let rec factorial n = match n with | 0 -> 1 | _ -> n * factorial(n - 1)

Feature 1 of 11 ► Functional programming let f (g: int -> int) y = g y let increment x = x + 1 let a = f increment 100 ► Lambda expression let f (g: int -> int) y = g y let a = f (fun x -> x + 1) 100

Feature 2 of 11 ► Compose the functions! let function1 x = x + 1 let function2 x = x * 2 let h = function1 >> function2 let a = h 100

Feature 3 of 11 ► Collection types for immutable data ► Usage: ??

Feature 4 of 11 ► Pattern matching (x is a list) let length x = match x with | [] -> “0” | [ _ ] -> “1” | [ _; _ ] -> “2” | _ -> “Too Long!”

Feature 5 of 11 ► Discriminated unions type Shape = | Circle of float | Square of double let area myShape = match myShape with | Circle r -> 3.14*r*r | Square r -> s*s

Feature 6 of 11 ► Interactive programming

Feature 7 of 11 ► Lazy computations & lazy evaluation let x = 10 let result = lazy (x + 10) do something printfn "%d" (result.Force())

Feature 8 of 11 ► Object oriented ► Class & inherit ► Single inheritance

Feature 9 of 11 ► Imperative programming ► Like C, C++, Java

Feature 10 of 11 ► Generics and type inference let makeList a b = [a; b] makeList 1 2 let function1 a = a + 1

Feature 11 of 11 ► Asynchronous workflows ► ??

Reference ► amming_language) ---- wikipedia F sharp amming_language) amming_language) ► dd MSDN F# reference dd dd ► htm CTO.com F# new features htm htm

Q&A