Einführung in Erlang und die VM
Erkunden Sie die Erlang Virtual Machine (BEAM), die grundlegende Syntax und Datentypen sowie die für die Erlang-Entwicklung erforderliche Denkweise der funktionalen Programmierung
Einführung in Erlang und die VM ist eine kostenlose Erlang OTP: Distributed & Fault-Tolerant Systems Programming-Lektion auf CoddyKit. Dies ist Lektion 1 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Erlang OTP: Distributed & Fault-Tolerant Systems Programming-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Erlang OTP: Distributed & Fault-Tolerant Systems Programming-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Meet Erlang: Built for Reliability
Erlang, built by Ericsson for systems that must never go down, is a functional language for fault-tolerant, concurrent, distributed apps.
The Power of BEAM
Erlang runs on the BEAM virtual machine, which manages millions of lightweight processes — the foundation of its concurrency and fault tolerance.
Your First Erlang Code
Time for Hello World. Erlang code lives in modules (.erl files) that declare a name and export functions by name and arity.
-module(hello_world).
-export([start/0]).
start() ->
io:format("Hello, Erlang!~n").The Erlang Shell: Your Playground
The Erlang shell (start it with erl) lets you type expressions and see results instantly. Remember to end each with a dot.
Variables: Single Assignment
Erlang variables start uppercase and use single assignment: once bound, a value cannot change in scope. That immutability prevents whole bug classes.
-module(variables).
-export([show/0]).
show() ->
X = 10,
Y = X * 2,
io:format("X is: ~w~n", [X]),
io:format("Y is: ~w~n", [Y]).Basic Types: Atoms & More
Core types: atoms (lowercase named constants like ok), numbers (integers and floats), and booleans, which are just the atoms true and false.
-module(basic_types).
-export([display/0]).
display() ->
Status = ok,
Count = 42,
Pi = 3.14159,
IsActive = true,
io:format("Status: ~w~n", [Status]),
io:format("Count: ~w~n", [Count]),
io:format("Pi: ~w~n", [Pi]),
io:format("Is Active: ~w~n", [IsActive]).Tuples: Fixed Collections
A tuple groups a fixed set of elements in curly braces, like {ok, Value}. It is immutable — build a new one to "change" it.
-module(tuples).
-export([show/0]).
show() ->
Person = {person, "Alice", 30, female},
Coordinate = {x, 10, y, 20},
io:format("Person: ~w~n", [Person]),
io:format("Coordinate: ~w~n", [Coordinate]).Lists: Flexible Sequences
A list in square brackets holds any number of ordered elements. You process it recursively as a Head (first item) and Tail (the rest).
-module(lists_example).
-export([show/0]).
show() ->
Numbers = [1, 2, 3, 4, 5],
Colors = [red, green, blue],
MixedList = [atom_name, 123, {tuple, 1}],
io:format("Numbers: ~w~n", [Numbers]),
io:format("Colors: ~w~n", [Colors]),
io:format("Mixed: ~w~n", [MixedList]).Thinking Functionally
Erlang is functional: data is immutable, functions avoid side effects, and functions are first-class values you pass around freely.
Quick Check: Erlang Basics
Let's test your understanding of basic Erlang concepts.
Which of the following statements about Erlang's core features are TRUE?
Recap: Erlang Basics
Recap: Erlang targets fault-tolerant concurrency on the BEAM, with modules, single-assignment variables, and core types like atoms, tuples, and lists.
Häufig gestellte Fragen
Ist die Lektion „Einführung in Erlang und die VM“ kostenlos?
Ja — der vollständige Text von „Einführung in Erlang und die VM“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Erlang OTP: Distributed & Fault-Tolerant Systems Programming-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Erlang OTP: Distributed & Fault-Tolerant Systems Programming-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Einführung in Erlang und die VM“?
Erkunden Sie die Erlang Virtual Machine (BEAM), die grundlegende Syntax und Datentypen sowie die für die Erlang-Entwicklung erforderliche Denkweise der funktionalen Programmierung Du übst Erlang OTP: Distributed & Fault-Tolerant Systems Programming mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Erlang OTP: Distributed & Fault-Tolerant Systems Programming zu starten?
Keine Vorkenntnisse erforderlich. Erlang OTP: Distributed & Fault-Tolerant Systems Programming auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 1 von 4.
Wie lange dauert die Lektion „Einführung in Erlang und die VM“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Erlang OTP: Distributed & Fault-Tolerant Systems Programming-Lektion Code schreiben und ausführen?
Ja. Jede Erlang OTP: Distributed & Fault-Tolerant Systems Programming-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Einführung in Erlang und die VM
- Erlang-Prozesse und Messaging
- Grundlegende Muster für Nebenläufigkeit
- Pattern Matching und Guards