Lesson 4. Saying a little, doing a lot

 

In this lesson, you’ll gain an overview of the basics of the F# language:

  • You’ll take a closer look at the F# language syntax, including the let keyword.
  • You’ll learn how to write some more-complex functions and values.
  • You’ll learn what scoping is, why it’s important for creating readable code, and how it works in F#.

Think about the programming languages that you use today. They come in all sorts of flavors and are known for being used in different fields or situations. For example, Java is well-known as an enterprise programming language—which has somewhat negative connotations of a slow-moving and verbose language. Others might have a reputation for being used at startups, academia, or in data science. Why are languages shoehorned into specific fields, when many of them say that they’re general-purpose programming languages? A combination of many factors sometimes helps push a language to a specific community or use case.

One of these factors might be the type system. For example, some languages are generally considered to be statically typed (Java, C#), whereas others are dynamic (Python, JavaScript, Ruby). The latter have gained a reputation for being used in startups because of the alleged speed at which development can occur for relatively simple systems (although several notable examples exist of organizations having to rewrite entire systems in a static language after the application grew too large—Twitter being one).

4.1. Binding values in F#

4.2. Scoping values

Summary

sitemap