F# Flashcards

(20 cards)

1
Q

Values in F# are mutable by default, meaning they can be changed at any time within
their scope.

A

(False)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The F# Software Foundation (FSSF) is a non-profit organization that is independent of
Microsoft.

A

(True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

F# 2.0 was first introduced as a standalone research project and was never shipped
inside Visual Studio.

A

(False)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In F#, indentation defines the scope of blocks like loops and functions.

A

(True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The let keyword is used only for declaring constant values.

A

(False)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

This specialized translator program translates F# source code into .NET Common
Intermediate Language (CIL).

A

F# Compiler (fsc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

This feature allows a developer to create a new variable with the same name as an
existing one, effectively hiding the old one.

A

Shadowing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

This non-blocking loop construct, introduced in recent versions of F#, allows
asynchronous control flow to remain as readable as standard imperative logic.

A

while! (while-bang)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which data structure in F# is an ordered, immutable collection of elements that must all
be of the same type?

A

List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What specific operator is used in F# to denote “not equal to”?

A

<>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What modern hardware architectures are compatible with F# through the .NET runtime.

A

● x64
● ARM32
● ARM64

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name the key features of F# mentioned in the report that defines its core identity or
functionality.

A

● Pattern Matching
● First-Class Functions
● Computation Expressions
● Type Inference
● Immutability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Name the two programming paradigms supported by F# in addition to functional
programming.

A

● Object-oriented
● Imperative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Name two ways F# handles program-level abstraction.

A

● Modules
● Namespaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the two (2) diagnostic controls introduced in recent versions of F# to enforce
stricter code quality?

A

● #warnon
● #nowarn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain the difference between a “List” and an “Array” in F# syntax and memory
structure.

A

In F#, a List is an immutable, linked structure where elements cannot be changed
after creation. An Array is a fixed-size, mutable sequence that allows direct
access to elements and can be modified.

17
Q

Describe how “Pattern Matching” works as a control-level structure.

A

Pattern matching allows a program to branch based on the “shape” or value of
data. It compares an expression against a series of patterns and executes the
code block associated with the first match.

18
Q

Discuss the role of “Modules” in organizing F# code.

A

Modules are used to group related functions, values, and types together. They
provide a way to encapsulate code, manage scope, and create a clean hierarchy
within a project.

19
Q

How does F# handle “Null” values differently than traditional C-style languages?

A

F# minimizes the use of nulls by encouraging the use of the Option type (Some
or None). Recent versions also include “safer null handling” that allows the
compiler to statically verify reference types to prevent runtime errors.

20
Q

What is the significance of “Immutability by Default” in F# program structure?

A

Because values cannot be changed by default, code is more predictable and
easier to debug. This structure simplifies concurrent programming because
different parts of a program can safely access the same data without fear of it
being modified unexpectedly.