SlideShare une entreprise Scribd logo
1  sur  10
Basis for comparison
programming languages
         By :Abdelrahman Ibrahim Elhais




              2012/2013
Object orientation:
There are several qualities for Object Oriented
Languages:
       Encapsulation
       Inheritance
       Polymorphism/dynamic binding.
       All operation performed by sending messages to object.
       All user-defined types are object.


    Java            C#         C++          Paython Visual
                                                    basic
    Hybrid          Hybrid     Hybrid/multi Hybrid Particular
                               -paradigm            support



Static vs. dynamic typing
     A dynamic type system doesn't require variables to be
     declared as a specific type.
     Statically type languages requires that all
     variables are declared with specific type.




           Java       C#       C++        Paython   Visual
                                                    basic
           Static     Static   Static     Dynamic   Static
Generic classes:
     refer to the ability to parameterize a class with specific
     data types.
     it allows statically typed languages to retain their compile-
     time type safety.

     Dynamically typed languages do not need parameterized
     types in order to support generic programming.


             Java        C#            C++        Paython    Visual
                                                             basic
             No          No            Yes        N/A        No




Inheritance :
the ability for a class or object to be defined as an extension or
specialization of another class or object.

Most object-oriented languages support class-based inheritance.

others such as SELF and JavaScript support object-based
inheritance.
A few languages, notably Python and Ruby, support both
class- and object-based inheritance.
      Java            C#               C++        Paython    Visual
                                                             basic
       Single class   Single class –   multiple   multiple   None
        –multiple       multiple
        interfaces    interfaces
Feature renaming:
Feature renaming is the ability for a class or object to rename
one of its features (a term used to collectively refer to
attributes and methods) that it inherited from a super class.



      Java       C#          C++           Paython     Visual
                                                       basic
         yes           yes– yes            No          No




Method overloading:
Method overloading (also referred to as parametric
polymorphism) is the ability for a class, module, or other scope
to have two or more methods with the same name.

Calls to these methods are disambiguated by the number
and/or type of arguments passed to the method at the call site.



      Java       C#          C++           Paython     Visual
                                                       basic
         yes     yes         yes           No          No
Operator overloading:
ability for a programmer to define an operator (such as +, or *)
for user-defined types.



      Java        C#          C++           Paython     Visual
                                                        basic
         No       Yes         yes           Yes         No




Higher Order Functions and
Lexical Closures
Higher Order Functions:
functions that can be treated as if they were data objects.

     they can be bound to variables (including the ability to be
     stored in collections).
     can be passed to other functions as parameters.
     can be returned as the result of other functions.

Lexical Closure:
 bundling up the lexical (static) scope surrounding the function
with the function itself, so that the function carries its
surrounding environment around with it wherever it may be
used.

      Java        C#          C++           Paython     Visual
                                                        basic
No      Yes       yes        Yes       No




Garbage Collection:
mechanism allowing a language implementation to
free memory of unused objects on behalf of the
programmer.

    Reference Counting
    Mark and Sweep
    Generational
D




     Java      C#        C++        Paython   Visual
                                              basic
         Mark Mark and None         Reference Reference
          and sweep
        sweep




Uniform Access:
All services offered by a mod-ule should be available
through a notation, which does not betray whether they
are implemented through storage or through
computation.

     Java      C#        C++        Paython   Visual
                                              basic
            No No        No         No        Yes
Class Variables/Methods:
Class variables and methods are owned by a class, and not any
particular instance of a class
This means that for however many instances of a class
exist at any given point in time, only one copy of each class
variable/method exists and is shared by every instance of the
class.



      Java        C#         C++           Paython     Visual
                                                       basic
      yes         Yes        yes           No          Yes




Reflection:
ability for a program to determine various pieces of
information about an object at run-time. Most object-
oriented languages support some form of reection.this
includes the ability to determine:
      the type of the object,
      its inheritance structure,
      and the methods it contains, including the number and
      types of parameters and return types
  .
      It might also include the ability for determining the names
      and types
Java           C#           C++               Paython    Visual
                                                              basic
     yes            Yes          No                Yes        No




Access Control:
ability for a modules implementation to remain hidden
behind its public interface.


    Java            C#           C++               Paython    Visual
                                                              basic
    Public –private Public –     Public –private   Name       Public-private
    -protected      private      -protected        mangling
                    -protected




Design by Contract:
Design by Contract (DBC) is the ability to incorporate
important aspects of a specification into the software that
is implementing it. The most important features of DBC
are:

     Pre-conditions, which are conditions that must be true
     before a method is invoked
     Post-conditions, which are conditions guaranteed to be
     true after the invocation of a method.
     Invariants, which are conditions guaranteed to be true at
     any stable point during the lifetime of an object..
     .
Java       C#          C++           Paython     Visual
                                                       basic
      No         No          No            No          No




Multithreading:
ability for a single process to process two or more tasks
concurrently.



      Java       C#          C++           Paython     Visual
                                                       basic
      Yes        Yes         libraries     Yes         No




Regular Expressions:
 pattern matching constructs capable of recognizing the class of
languages known as regular languages.
D

      Java       C#          C++           Paython     Visual
                                                       basic
      Standard Standard      No            Standard    No
      libraries libraries                  libraries

Pointer Arithmetic :
ability for a language to directly manipulate memory addresses
and their contents.
D



      Java        C#          C++           Paython     Visual
                                                        basic
      No          Yes         Yes           No          No




Language Integration:
It is important for a high level language (particularly interpreted
languages) to be able to integrate seamlessly with other
languages.
      Java       C#           C++           Paython     Visual
                                                        basic
      With       All .net  With        With             With c
      c,c++      languages c,assembler c,c++,java




Built-In Security:
language implementations ability to determine whether or not a
piece of code comes from a trusted source (such as the users
hard disk), limiting the permissions of the code if it does not.

      Java        C#          C++           Paython     Visual
                                                        basic
      Yes         Yes         No            No          No

Contenu connexe

Tendances

Object oriented-programming-in-c-sharp
Object oriented-programming-in-c-sharpObject oriented-programming-in-c-sharp
Object oriented-programming-in-c-sharpAbefo
 
08 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_1108 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_11Niit Care
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)John Smith
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java BytecodeTeodoro Cipresso
 
01 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_0101 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_01Niit Care
 
Difference between java and c#
Difference between java and c#Difference between java and c#
Difference between java and c#TECOS
 
09 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_1309 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_13Niit Care
 
07 iec t1_s1_oo_ps_session_10
07 iec t1_s1_oo_ps_session_1007 iec t1_s1_oo_ps_session_10
07 iec t1_s1_oo_ps_session_10Niit Care
 
Applying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeApplying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeTeodoro Cipresso
 
04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05Niit Care
 
Boogie 2011 Hi-Lite
Boogie 2011 Hi-LiteBoogie 2011 Hi-Lite
Boogie 2011 Hi-LiteAdaCore
 
C# 3.0 and 4.0
C# 3.0 and 4.0C# 3.0 and 4.0
C# 3.0 and 4.0Buu Nguyen
 
C++ vs java which is best for future
C++ vs java which is best for futureC++ vs java which is best for future
C++ vs java which is best for futurecalltutors
 
Lecture 3 java basics
Lecture 3 java basicsLecture 3 java basics
Lecture 3 java basicsthe_wumberlog
 
OOP Comparative Study
OOP Comparative StudyOOP Comparative Study
OOP Comparative StudyDarren Tan
 

Tendances (20)

Object oriented-programming-in-c-sharp
Object oriented-programming-in-c-sharpObject oriented-programming-in-c-sharp
Object oriented-programming-in-c-sharp
 
08 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_1108 iec t1_s1_oo_ps_session_11
08 iec t1_s1_oo_ps_session_11
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
109842496 jni
109842496 jni109842496 jni
109842496 jni
 
Reversing and Patching Java Bytecode
Reversing and Patching Java BytecodeReversing and Patching Java Bytecode
Reversing and Patching Java Bytecode
 
01 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_0101 iec t1_s1_oo_ps_session_01
01 iec t1_s1_oo_ps_session_01
 
Java
JavaJava
Java
 
Difference between c, c++ and java
Difference between c, c++ and javaDifference between c, c++ and java
Difference between c, c++ and java
 
Difference between java and c#
Difference between java and c#Difference between java and c#
Difference between java and c#
 
09 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_1309 iec t1_s1_oo_ps_session_13
09 iec t1_s1_oo_ps_session_13
 
Csci360 20
Csci360 20Csci360 20
Csci360 20
 
Csci360 20 (1)
Csci360 20 (1)Csci360 20 (1)
Csci360 20 (1)
 
07 iec t1_s1_oo_ps_session_10
07 iec t1_s1_oo_ps_session_1007 iec t1_s1_oo_ps_session_10
07 iec t1_s1_oo_ps_session_10
 
Applying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java BytecodeApplying Anti-Reversing Techniques to Java Bytecode
Applying Anti-Reversing Techniques to Java Bytecode
 
04 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_0504 iec t1_s1_oo_ps_session_05
04 iec t1_s1_oo_ps_session_05
 
Boogie 2011 Hi-Lite
Boogie 2011 Hi-LiteBoogie 2011 Hi-Lite
Boogie 2011 Hi-Lite
 
C# 3.0 and 4.0
C# 3.0 and 4.0C# 3.0 and 4.0
C# 3.0 and 4.0
 
C++ vs java which is best for future
C++ vs java which is best for futureC++ vs java which is best for future
C++ vs java which is best for future
 
Lecture 3 java basics
Lecture 3 java basicsLecture 3 java basics
Lecture 3 java basics
 
OOP Comparative Study
OOP Comparative StudyOOP Comparative Study
OOP Comparative Study
 

En vedette

The Impact of Software Engineering Research on Modern Programming Languages
The Impact of Software Engineering Research on Modern Programming LanguagesThe Impact of Software Engineering Research on Modern Programming Languages
The Impact of Software Engineering Research on Modern Programming LanguagesFederico Govoni
 
Trends in programming languages
Trends in programming languagesTrends in programming languages
Trends in programming languagesAntya Dev
 
SDN Networks Programming Languages
SDN Networks Programming LanguagesSDN Networks Programming Languages
SDN Networks Programming LanguagesFlavio Vit
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming LanguagesRay Toal
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practiceshoctudau
 
Pyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDNPyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDNnvirters
 
Html & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshopHtml & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshopVero Rebagliatte
 

En vedette (8)

Web ninja
Web ninjaWeb ninja
Web ninja
 
The Impact of Software Engineering Research on Modern Programming Languages
The Impact of Software Engineering Research on Modern Programming LanguagesThe Impact of Software Engineering Research on Modern Programming Languages
The Impact of Software Engineering Research on Modern Programming Languages
 
Trends in programming languages
Trends in programming languagesTrends in programming languages
Trends in programming languages
 
SDN Networks Programming Languages
SDN Networks Programming LanguagesSDN Networks Programming Languages
SDN Networks Programming Languages
 
Learning and Modern Programming Languages
Learning and Modern Programming LanguagesLearning and Modern Programming Languages
Learning and Modern Programming Languages
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practices
 
Pyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDNPyretic - A new programmer friendly language for SDN
Pyretic - A new programmer friendly language for SDN
 
Html & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshopHtml & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshop
 

Similaire à Basis for comparison programming languages

Introduction to java
Introduction to javaIntroduction to java
Introduction to javasanjay joshi
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to JavaDevaKumari Vijay
 
Structure of java program diff c- cpp and java
Structure of java program  diff c- cpp and javaStructure of java program  diff c- cpp and java
Structure of java program diff c- cpp and javaMadishetty Prathibha
 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in MuleAnand kalla
 
C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?calltutors
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)smumbahelp
 
Core Java Tutorial
Core Java TutorialCore Java Tutorial
Core Java TutorialJava2Blog
 
Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basicseleksdev
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Chicago Hadoop Users Group
 
Automation Testing - Part 2 (Things to know in JAVA) - SLT
Automation Testing - Part 2 (Things to know in JAVA) - SLTAutomation Testing - Part 2 (Things to know in JAVA) - SLT
Automation Testing - Part 2 (Things to know in JAVA) - SLTAnkit Prajapati
 

Similaire à Basis for comparison programming languages (20)

C vs JAVA.pptx
C vs JAVA.pptxC vs JAVA.pptx
C vs JAVA.pptx
 
OOPS JAVA.pdf
OOPS JAVA.pdfOOPS JAVA.pdf
OOPS JAVA.pdf
 
Java1
Java1Java1
Java1
 
Java
Java Java
Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Structure of java program diff c- cpp and java
Structure of java program  diff c- cpp and javaStructure of java program  diff c- cpp and java
Structure of java program diff c- cpp and java
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Java Starting
Java StartingJava Starting
Java Starting
 
Lecture19.07.2014
Lecture19.07.2014Lecture19.07.2014
Lecture19.07.2014
 
Java Fundamentals in Mule
Java Fundamentals in MuleJava Fundamentals in Mule
Java Fundamentals in Mule
 
C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)
 
Core Java Tutorial
Core Java TutorialCore Java Tutorial
Core Java Tutorial
 
Core java part1
Core java  part1Core java  part1
Core java part1
 
Java features
Java  features Java  features
Java features
 
Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basics
 
Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416Avro - More Than Just a Serialization Framework - CHUG - 20120416
Avro - More Than Just a Serialization Framework - CHUG - 20120416
 
Automation Testing - Part 2 (Things to know in JAVA) - SLT
Automation Testing - Part 2 (Things to know in JAVA) - SLTAutomation Testing - Part 2 (Things to know in JAVA) - SLT
Automation Testing - Part 2 (Things to know in JAVA) - SLT
 

Basis for comparison programming languages

  • 1. Basis for comparison programming languages By :Abdelrahman Ibrahim Elhais 2012/2013
  • 2. Object orientation: There are several qualities for Object Oriented Languages: Encapsulation Inheritance Polymorphism/dynamic binding. All operation performed by sending messages to object. All user-defined types are object. Java C# C++ Paython Visual basic Hybrid Hybrid Hybrid/multi Hybrid Particular -paradigm support Static vs. dynamic typing A dynamic type system doesn't require variables to be declared as a specific type. Statically type languages requires that all variables are declared with specific type. Java C# C++ Paython Visual basic Static Static Static Dynamic Static
  • 3. Generic classes: refer to the ability to parameterize a class with specific data types. it allows statically typed languages to retain their compile- time type safety. Dynamically typed languages do not need parameterized types in order to support generic programming. Java C# C++ Paython Visual basic No No Yes N/A No Inheritance : the ability for a class or object to be defined as an extension or specialization of another class or object. Most object-oriented languages support class-based inheritance. others such as SELF and JavaScript support object-based inheritance. A few languages, notably Python and Ruby, support both class- and object-based inheritance. Java C# C++ Paython Visual basic Single class Single class – multiple multiple None –multiple multiple interfaces interfaces
  • 4. Feature renaming: Feature renaming is the ability for a class or object to rename one of its features (a term used to collectively refer to attributes and methods) that it inherited from a super class. Java C# C++ Paython Visual basic yes yes– yes No No Method overloading: Method overloading (also referred to as parametric polymorphism) is the ability for a class, module, or other scope to have two or more methods with the same name. Calls to these methods are disambiguated by the number and/or type of arguments passed to the method at the call site. Java C# C++ Paython Visual basic yes yes yes No No
  • 5. Operator overloading: ability for a programmer to define an operator (such as +, or *) for user-defined types. Java C# C++ Paython Visual basic No Yes yes Yes No Higher Order Functions and Lexical Closures Higher Order Functions: functions that can be treated as if they were data objects. they can be bound to variables (including the ability to be stored in collections). can be passed to other functions as parameters. can be returned as the result of other functions. Lexical Closure: bundling up the lexical (static) scope surrounding the function with the function itself, so that the function carries its surrounding environment around with it wherever it may be used. Java C# C++ Paython Visual basic
  • 6. No Yes yes Yes No Garbage Collection: mechanism allowing a language implementation to free memory of unused objects on behalf of the programmer. Reference Counting Mark and Sweep Generational D Java C# C++ Paython Visual basic Mark Mark and None Reference Reference and sweep sweep Uniform Access: All services offered by a mod-ule should be available through a notation, which does not betray whether they are implemented through storage or through computation. Java C# C++ Paython Visual basic No No No No Yes
  • 7. Class Variables/Methods: Class variables and methods are owned by a class, and not any particular instance of a class This means that for however many instances of a class exist at any given point in time, only one copy of each class variable/method exists and is shared by every instance of the class. Java C# C++ Paython Visual basic yes Yes yes No Yes Reflection: ability for a program to determine various pieces of information about an object at run-time. Most object- oriented languages support some form of reection.this includes the ability to determine: the type of the object, its inheritance structure, and the methods it contains, including the number and types of parameters and return types . It might also include the ability for determining the names and types
  • 8. Java C# C++ Paython Visual basic yes Yes No Yes No Access Control: ability for a modules implementation to remain hidden behind its public interface. Java C# C++ Paython Visual basic Public –private Public – Public –private Name Public-private -protected private -protected mangling -protected Design by Contract: Design by Contract (DBC) is the ability to incorporate important aspects of a specification into the software that is implementing it. The most important features of DBC are: Pre-conditions, which are conditions that must be true before a method is invoked Post-conditions, which are conditions guaranteed to be true after the invocation of a method. Invariants, which are conditions guaranteed to be true at any stable point during the lifetime of an object.. .
  • 9. Java C# C++ Paython Visual basic No No No No No Multithreading: ability for a single process to process two or more tasks concurrently. Java C# C++ Paython Visual basic Yes Yes libraries Yes No Regular Expressions: pattern matching constructs capable of recognizing the class of languages known as regular languages. D Java C# C++ Paython Visual basic Standard Standard No Standard No libraries libraries libraries Pointer Arithmetic : ability for a language to directly manipulate memory addresses and their contents.
  • 10. D Java C# C++ Paython Visual basic No Yes Yes No No Language Integration: It is important for a high level language (particularly interpreted languages) to be able to integrate seamlessly with other languages. Java C# C++ Paython Visual basic With All .net With With With c c,c++ languages c,assembler c,c++,java Built-In Security: language implementations ability to determine whether or not a piece of code comes from a trusted source (such as the users hard disk), limiting the permissions of the code if it does not. Java C# C++ Paython Visual basic Yes Yes No No No