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

การเปรียบเทียบ C++ vs Java vs Python

โปรแกรมกลายเป็นส่วนหนึ่งของชีวิตประจำวัน ทุกอย่างถูกทำให้อัตโนมัติและเชื่อมต่อกับ IoT

ภาษาโปรแกรมยอดนิยมในหมู่นักพัฒนาคือ C++, Java, และ Python

  • C++ เป็นภาษาที่คอมไพล์และรวดเร็ว เป็นภาษาแรกที่นักเขียนโปรแกรมหลายคนเรียนรู้
  • Java โดดเด่นด้วยความเป็นอิสระจากแพลตฟอร์ม และมีแอปพลิเคชันเดสก์ท็อปจำนวนมากพัฒนาด้วย Java
  • Python เป็นภาษา interpreted สมัยใหม่ และเป็นภาษาที่พิมพ์ได้เร็ว (fast typing)
C++ Java Python
Compiled Programming language Compiled Programming Language Interpreted Programming Language
Supports Operator overloading Does not support Operator Overloading Supports Operator overloading
Provide both single and multiple inheritance Provide partial multiple inheritance using interfaces Provide both single and multiple inheritance
Platform dependent Platform Independent Platform Independent
Does Not support threads Has in build multithreading support Supports multithreading
Has limited number of library support Has library support for many concepts like UI Has a huge set of libraries that make it fit for AI, datascience, etc.
Code length is a bit lesser, 1.5 times less that java. Java has quite huge code. Smaller code length, 3-4 times less than java.
Functions and variables are used outside the class Every bit of code is inside a class. Functions and variables can be declared and used outside the class also.
C++ program is a fast compiling programming language. Java Program compiler a bit slower than C++ Due to the use of interpreter execution is slower.
Strictly uses syntax norms like ; and {}. Strictly uses syntax norms like punctuations , ; . Use of ; is not compulsory.