Coursera
Catalog
  • Browse
  • Search
  • For Enterprise
  • Log In
  • Sign Up
✕

Scala 函数式程序设计原理

OverviewSyllabusFAQsCreatorsPricingRatings and Reviews

Home计算机科学软件开发

Scala 函数式程序设计原理

洛桑联邦理工学院

About this course: 函数式编程在工业界的应用日趋广泛。Scala作为众多应用使用的主要语言大力推进了这一趋势。Scala融合了函数式编程和面向对象编程的有点,可以和Java以及JavaScript无缝衔接。很多重量级的应用框架像Apache Spark,Kafka以及Akka都是使用Scala实现的。而这些应用框架正是很多网站的核心基础框架,像Twitter,Tumblr 和Coursera。 这门课程会带你认识函数式编程风格,以及如何把这种风格应用于日常的生产开发中。通过探索函数编程中广泛存在的不可变元素,追踪程序运行过程中函数标记的变化,你也会对函数式编程的原理有深刻认识。 这门课程注重实践,课程中的大部分单元都会使用一些简短的程序来阐述基本原理和概念,听众可以试着运行这些程序并尝试改写它们。这门课程附带有一些列的编程项目作为家庭作业。 学习目标,完成这门课程的学习后,你会: -理解函数式编程的原理 -会使用递归,模式识别,高级函数 编写纯函数式程序 -会在函数式程序中使用对象和类 -会设计不可变的数据结构 -会分析函数的性质 -理解函数式编程的泛型类型 听众最好有以下背景:至少一年的编程经验,最好能熟练掌握Java或者C#,但是使用过其他语言像是 C/C++, Python, Javascript或者Ruby也足以上这门课。熟悉命令行编程。


Created by:  洛桑联邦理工学院
洛桑联邦理工学院

  • Martin Odersky

    Taught by:  Martin Odersky, Professor

    Computer Science
Basic Info
Course 1 of 5 in the Functional Programming in Scala Specialization
LevelIntermediate
Language
English, Subtitles: Korean, Serbian, French
How To PassPass all graded assignments to complete the course.
User Ratings
4.8 stars
Average User Rating 4.8See what learners said
Syllabus
WEEK 1
Getting Started + Functions & Evaluation
Get up and running with Scala on your computer. Complete an example assignment to familiarize yourself with our unique way of submitting assignments. In this week, we'll learn the difference between functional imperative programming. We step through the basics of Scala; covering expressions, evaluation, conditionals, functions, and recursion
11 videos, 8 readings, 1 practice quiz
  1. Video: Course Introduction
  2. Video: Tools Setup for Linux
  3. Video: Tools Setup for Mac OS X
  4. Video: Tools Setup for Windows
  5. Programação que não vale nota: Example Assignment
  6. Leitura: Tools Setup (Please read)
  7. Leitura: Cheat Sheet
  8. Leitura: IntelliJ IDEA Tutorial
  9. Leitura: Eclipse Tutorial
  10. Leitura: SBT tutorial and Submission of Assignments (Please read)
  11. Leitura: Learning Resources
  12. Leitura: Scala Tutorial
  13. Leitura: Scala Style Guide
  14. Video: Lecture 1.1 - Programming Paradigms
  15. Video: Lecture 1.2 - Elements of Programming
  16. Video: Lecture 1.3 - Evaluation Strategies and Termination
  17. Video: Lecture 1.4 - Conditionals and Value Definitions
  18. Video: Lecture 1.5 - Example: square roots with Newton's method
  19. Video: Lecture 1.6 - Blocks and Lexical Scope
  20. Video: Lecture 1.7 - Tail Recursion
  21. Programação que não vale nota: Recursion
  22. Teste para praticar: Learning check-in
Graded: Recursion
WEEK 2
Higher Order Functions
This week, we'll learn about functions as first-class values, and higher order functions. We'll also learn about Scala's syntax and how it's formally defined. Finally, we'll learn about methods, classes, and data abstraction through the design of a data structure for rational numbers.
7 videos
  1. Video: Lecture 2.1 - Higher-Order Functions
  2. Video: Lecture 2.2 - Currying
  3. Video: Lecture 2.3 - Example: Finding Fixed Points
  4. Video: Lecture 2.4 - Scala Syntax Summary
  5. Video: Lecture 2.5 - Functions and Data
  6. Video: Lecture 2.6 - More Fun With Rationals
  7. Video: Lecture 2.7 - Evaluation and Operators
  8. Programação que não vale nota: Functional Sets
Graded: Functional Sets
WEEK 3
Data and Abstraction
This week, we'll cover traits, and we'll learn how to organize classes into hierarchies. We'll cover the hierarchy of standard Scala types, and see how to organize classes and traits into packages. Finally, we'll touch upon the different sorts of polymorphism in Scala.
3 videos
  1. Video: Lecture 3.1 - Class Hierarchies
  2. Video: Lecture 3.2 - How Classes Are Organized
  3. Video: Lecture 3.3 - Polymorphism
  4. Programação que não vale nota: Object-Oriented Sets
Graded: Object-Oriented Sets
WEEK 4
Types and Pattern Matching
This week we'll learn about the relationship between functions and objects in Scala; functions *are* objects! We'll zoom in on Scala's type system, covering subtyping and generics, and moving on to more advanced aspects of Scala's type system like variance. Finally, we'll cover Scala's most widely used data structure, Lists, and one of Scala's most powerful tools, pattern matching.
7 videos
  1. Video: Lecture 4.1 - Objects Everywhere
  2. Video: Lecture 4.2 - Functions as Objects
  3. Video: Lecture 4.3 - Subtyping and Generics
  4. Video: Lecture 4.4 - Variance (Optional)
  5. Video: Lecture 4.5 - Decomposition
  6. Video: Lecture 4.6 - Pattern Matching
  7. Video: Lecture 4.7 - Lists
  8. Programação que não vale nota: Huffman Coding
Graded: Huffman Coding
WEEK 5
Lists
This week we dive into Lists, the most commonly-used data structure in Scala.
7 videos
  1. Video: Lecture 5.1 - More Functions on Lists
  2. Video: Lecture 5.2 - Pairs and Tuples
  3. Video: Lecture 5.3 - Implicit Parameters
  4. Video: Lecture 5.4 - Higher-Order List Functions
  5. Video: Lecture 5.5 - Reduction of Lists
  6. Video: Lecture 5.6 - Reasoning About Concat
  7. Video: Lecture 5.7 - A Larger Equational Proof on Lists
WEEK 6
Collections
After a deep-dive into Lists, this week we'll explore other data structures; vectors, maps, ranges, arrays, and more. We'll dive into Scala's powerful and flexible for-comprehensions for querying data.
6 videos
  1. Video: Lecture 6.1 - Other Collections
  2. Video: Lecture 6.2 - Combinatorial Search and For-Expressions
  3. Video: Lecture 6.3 - Combinatorial Search Example
  4. Video: Lecture 6.4 - Maps
  5. Video: Lecture 6.5 - Putting the Pieces Together
  6. Video: Conclusion
  7. Programação que não vale nota: Anagrams
Graded: Anagrams

FAQs
How It Works
Trabalho
Trabalho

Cada curso é como um livro didático interativo, com vídeos pré-gravados, testes e projetos.

Ajuda dos seus colegas
Ajuda dos seus colegas

Conecte-se com milhares de outros aprendizes, debata ideias, discuta sobre os materiais do curso e obtenha ajuda para dominar conceitos.

Certificados
Certificados

Obtenha reconhecimento oficial pelo seu trabalho e compartilhe seu sucesso com amigos, colegas e empregadores.

Creators
洛桑联邦理工学院
Pricing
Purchase Course
Access to course materials

Available

Access to graded materials

Available

Receive a final grade

Available

Earn a shareable Course Certificate

Available

Ratings and Reviews
Rated 4.8 out of 5 of 4,886 ratings
Viacheslav Petc

Awsome

EF

Great introduction to functional programming in general, you might need to be familiar with some basic concepts of functional programming, but I never felt lost in it. The difficulty is just right and the pacing is perfect. Recommended.

ОП

The course is very hard and interesting even for programmers with Scala experience thanks to lots of advanced algorithms related assignments.

But the suggestions are sometimes misleading (e.g. in the assignment called objset it says to use tail-recursive helper funciton which you cannot do with trees because you have to recurse in two direcitons, unlike with lists)

AM

Excellent course. I do not recommend it as a first-stop introduction to FP - I tried that and utterly failed. First, go away and read a Scala book and do the exercises (I recommend the ubiquitous read book "Functional Programming in Scala"). If you pass this course and are honest about submitting your own work, you will come out on the other side with a rock-solid foundational knowledge of FP.



You May Also Like
洛桑联邦理工学院
Functional Program Design in Scala
1 course
洛桑联邦理工学院
Functional Program Design in Scala
View course
洛桑联邦理工学院
并行编程
1 course
洛桑联邦理工学院
并行编程
View course
洛桑联邦理工学院
Big Data Analysis with Scala and Spark
1 course
洛桑联邦理工学院
Big Data Analysis with Scala and Spark
View course
洛桑联邦理工学院
Functional Programming in Scala Capstone
1 course
洛桑联邦理工学院
Functional Programming in Scala Capstone
View course
Rice University
Parallel Programming in Java
1 course
Rice University
Parallel Programming in Java
View course
Coursera
Coursera provides universal access to the world’s best education, partnering with top universities and organizations to offer courses online.
© 2018 Coursera Inc. All rights reserved.
Download on the App StoreGet it on Google Play
  • Coursera
  • About
  • Leadership
  • Careers
  • Catalog
  • Certificates
  • Degrees
  • For Business
  • For Government
  • Community
  • Partners
  • Mentors
  • Translators
  • Developers
  • Beta Testers
  • Connect
  • Blog
  • Facebook
  • LinkedIn
  • Twitter
  • Google+
  • Tech Blog
  • More
  • Terms
  • Privacy
  • Help
  • Accessibility
  • Press
  • Contact
  • Directory
  • Affiliates