Chapter 2: Basic Semantics and Features of Crystal
In this chapter, you will learn the basics of Crystal programming to bring you up to speed even if you don't know yet how to write a single line of Crystal code. Here you will learn about things common to many other programming languages, such as variables, functions, and control structures, and features particular to Crystal, such as the type system and passing blocks. It is expected that you have prior basic experience with some other programming language.
This chapter will cover the following main topics:
- Values and expressions
- Controlling the execution flow with conditionals
- Exploring the type system
- Organizing your code in methods
- Data containers
- Organizing your code in files
Technical ...
Get Crystal Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.