3 ms·
I think many teachers would disagree about the usage of Zig for CS, and over the widely accepted and used C language or even over popular newer ones such as Go,
by Tozen 4y ago
I think many teachers would disagree about the usage of Zig for CS, and over the widely accepted and used C language or even over popular newer ones such as Go, D, or Rust. Not to mention the strong push that Embarcadero still makes to push Object Pascal (Delphi) into classrooms, and how well known Pascal/Object Pascal still is in countries outside of the U.S.
1) Zig lacks features where they could teach about OOP.
There is no classes or inheritance. To include Zig doesn't lend itself so well to even the more general object-orientated concepts, which are in newer languages like Go or Vlang and others (structs that can be assigned methods and having interfaces). Like it or not (rightly or wrongly), class-based OOP still has many "hypnotized" and conditioned to its necessity.
2) There is the issue of having to address manual memory management.
While that would be the same problem for C, many teachers choose to go the easier route, and select languages like Python or Java. Others like Go, Vlang, D, etc... would make things easier as well.
And Pascal/Object Pascal (Delphi) is still around (a language made for being taught in CS), with a ton of books covering pointers, the heap, bytes, memory management, etc...
3) Zig is still a widely unknown and developing language.
Zig is years away from reaching 1.0. Many teachers are conservative. They often will go with what is already widely known and will likely create the least amount of controversy.
If more teachers can be convinced out of being so conservative, it would probably be because a language is being so strongly pushed by famous companies that are targeting schools or by demand in the job market. Google pushing Go, Oracle pushing Java, Microsoft pushing C#, etc...