Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> การเขียนโปรแกรม C

ประวัติความเป็นมาของภาษา C


ประวัติภาษา C

  • พัฒนาโดย: Dennis Ritchie ที่ Bell Labs
  • ปี: 1972
  • วัตถุประสงค์: เขียน UNIX Operating System แทนภาษา Assembly, B, BCPL

Timeline สำคัญ

ปีเหตุการณ์
1969UNIX เริ่มพัฒนา (ภาษา Assembly)
1970ภาษา B พัฒนาโดย Ken Thompson (จาก BCPL)
1971-72Dennis Ritchie พัฒนา C จาก B เพิ่ม Types, Structures
1972UNIX Kernel เขียนใหม่ด้วย C (ครั้งแรก OS เขียน High-level Language)
1978K&R C: "The C Programming Language" โดย Kernighan & Ritchie
1983ANSI จัดทำมาตรฐาน C (ANSI C / C89)
1989ANSI C Ratified (C89/C90)
1990ISO C90 (International Standard)
1999C99 Standard (VLA, // Comments, inline, restrict, etc.)
2011C11 Standard (Threads, Atomics, Generic Selections, _Static_assert)
2018C18 Standard (Bug fixes เท่านั้น)
2024C23 Standard (Attributes, constexpr, nullptr, modules, etc.)

เหตุการณ์สำคัญที่เกี่ยวข้อง

  • 1985: Windows 1.0 Released - Kernel ส่วนใหญ่เขียนด้วย C
  • 1991: Linux Kernel เริ่มพัฒนาโดย Linus Torvalds - เขียนด้วย C
  • 1992: Linux Released Under GPL - เป็นส่วนของ GNU OS
  • 1977: Oracle Database เริ่มพัฒนา
  • 1983: Oracle Rewrite จาก Assembly → C (กลายเป็น DB ยอดนิยม)
  • GNU Project: เริ่มด้วย C และ Lisp - หลาย Components เขียนด้วย C

ทำไม C ถึง Popular จนวันนี้?

  1. Performance & Efficiency: ใกล้ Hardware, ควบคุม Memory ได้
  2. Portability: Compiler มีทุก Platform, Standard Library เหมือนกัน
  3. OS Development: Linux, Windows, macOS, iOS, Android Kernels ล้วนเป็น C
  4. Embedded Systems: Microcontrollers, IoT, Firmware
  5. Legacy Codebase: โค้ดล้านบรรทัด ยังคง Maintain และขยาย
  6. Foundation: C++, Objective-C, C#, Java, Python, Rust, Go, Swift ได้แรงบันดาลใจ/Implementation จาก C

Standard Versions สรุป

StandardYearKey Features
K&R C1978Original, Implicit int, No Prototypes
C89/C901989/90ANSI/ISO Standard, Function Prototypes, const, volatile
C991999VLA, // Comments, stdint.h, inttypes.h, restrict, inline, _Bool, _Complex
C112011Threads (<threads.h>), Atomics, Generic Selections, Alignment, Bounds Checking Annex
C182018Defect Reports Only (No New Features)
C232024nullptr, constexpr, Attributes [[...]], Modules, typeof(), #embed