Welcome to the first lesson of our Zig programming language course!
In this lesson, we will cover the basics of Zig, including its history, reasons for its development, and a comparison with other programming languages like C and Rust.
We’ll also set up our development environment and write our first "Hello World" program in Zig.
------
Support Me :) :
- paypal [ https://www.paypal.me/MaysaraElshewehy ]
- ko-fi [ https://ko-fi.com/codeguild ]
------
Social Media :
- Discord (https://discord.gg/pZpNmnJWBm)
- Facebook (https://www.facebook.com/CodeGuild.ID)
- Instagram (https://www.Instagram.com/CodeGuild.ID)
- X/Twitter (https://www.x.com/CodeGuild_ID)
- Github (https://www.Github.com/CodeGuild-ID)
------
Video Sections :
0:00 Introduction
Overview of the course and what to expect.
Introduction to Zig programming language.
0:10 What is Zig?
Definition and purpose of Zig.
Key features: high performance, memory safety, simplicity, and portability.
0:38 History of Zig
Development timeline: From 2015 by Andrew Kelley to its growing popularity.
1:01 Comparing Zig with C
Performance: Zig vs. C.
Safety: Zig’s safety features vs. C’s limitations.
Simplicity: Zig’s clear syntax compared to C.
1:16 Comparing Zig with Rust
Performance: Zig vs. Rust.
Safety: Rust’s strong safety features vs. Zig’s good memory safety.
Learning curve: Zig’s simplicity vs. Rust’s complexity.
1:31 Installing Zig
Visit ziglang.org and download Zig.
Installation steps for Windows.
2:18 IDE
Examples of common code editors.
Why don't we use a regular text editor.
What is the best code editor to get started?
2:48 Setting Up Visual Studio Code
Installation of Visual Studio Code.
Adding the Zig extension to VS Code.
3:11 Creating Your First Zig Program
3:15 Creating the Project
Setting up a folder for the Zig project.
4:05 Writing Code
Example of a basic "Hello World" program in Zig.
4:08 The std library.
The build-in libs.
The third-party libs.
4:36 Syntax Basics.
Explanation of constants, variables, and functions.
5:03 import
5:57 The Compiler
7:10 How programs work ?
7:19 What is the entry point ?
7:25 What is the function, variable and constant ?
9:17 The Scope
9:55 Coding
- Running and Testing Your Code
14:18 Running the Program
Using zig run main.zig.
14:35 Handling Errors
Common errors and troubleshooting tips.
Runtime errors.
Compile-time errors.
17:41 Building the Application
Creating an Executable.
Using zig build-exe main.zig to build an executable.
Running the Executable.
How to run your compiled application.
19:17 Conclusion and Future Lessons
------
Thank you for watching! If you found this video helpful, please like, comment, and subscribe to the channel. Your support helps us create more free content. Don’t forget to hit the notification bell to stay updated with our latest videos!