Basis for comparison programming languages

640 views
559 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
640
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Basis for comparison programming languages

  1. 1. Basis for comparisonprogramming languages By :Abdelrahman Ibrahim Elhais 2012/2013
  2. 2. Object orientation:There are several qualities for Object OrientedLanguages: 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 supportStatic vs. dynamic typing A dynamic type system doesnt 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. 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 NoInheritance :the ability for a class or object to be defined as an extension orspecialization of another class or object.Most object-oriented languages support class-based inheritance.others such as SELF and JavaScript support object-basedinheritance.A few languages, notably Python and Ruby, support bothclass- and object-based inheritance. Java C# C++ Paython Visual basic Single class Single class – multiple multiple None –multiple multiple interfaces interfaces
  4. 4. Feature renaming:Feature renaming is the ability for a class or object to renameone of its features (a term used to collectively refer toattributes and methods) that it inherited from a super class. Java C# C++ Paython Visual basic yes yes– yes No NoMethod overloading:Method overloading (also referred to as parametricpolymorphism) is the ability for a class, module, or other scopeto have two or more methods with the same name.Calls to these methods are disambiguated by the numberand/or type of arguments passed to the method at the call site. Java C# C++ Paython Visual basic yes yes yes No No
  5. 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 NoHigher Order Functions andLexical ClosuresHigher 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 functionwith the function itself, so that the function carries itssurrounding environment around with it wherever it may beused. Java C# C++ Paython Visual basic
  6. 6. No Yes yes Yes NoGarbage Collection:mechanism allowing a language implementation tofree memory of unused objects on behalf of theprogrammer. Reference Counting Mark and Sweep GenerationalD Java C# C++ Paython Visual basic Mark Mark and None Reference Reference and sweep sweepUniform Access:All services offered by a mod-ule should be availablethrough a notation, which does not betray whether theyare implemented through storage or throughcomputation. Java C# C++ Paython Visual basic No No No No Yes
  7. 7. Class Variables/Methods:Class variables and methods are owned by a class, and not anyparticular instance of a classThis means that for however many instances of a classexist at any given point in time, only one copy of each classvariable/method exists and is shared by every instance of theclass. Java C# C++ Paython Visual basic yes Yes yes No YesReflection:ability for a program to determine various pieces ofinformation about an object at run-time. Most object-oriented languages support some form of reection.thisincludes 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. 8. Java C# C++ Paython Visual basic yes Yes No Yes NoAccess Control:ability for a modules implementation to remain hiddenbehind its public interface. Java C# C++ Paython Visual basic Public –private Public – Public –private Name Public-private -protected private -protected mangling -protectedDesign by Contract:Design by Contract (DBC) is the ability to incorporateimportant aspects of a specification into the software thatis implementing it. The most important features of DBCare: 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. 9. Java C# C++ Paython Visual basic No No No No NoMultithreading:ability for a single process to process two or more tasksconcurrently. Java C# C++ Paython Visual basic Yes Yes libraries Yes NoRegular Expressions: pattern matching constructs capable of recognizing the class oflanguages known as regular languages.D Java C# C++ Paython Visual basic Standard Standard No Standard No libraries libraries librariesPointer Arithmetic :ability for a language to directly manipulate memory addressesand their contents.
  10. 10. D Java C# C++ Paython Visual basic No Yes Yes No NoLanguage Integration:It is important for a high level language (particularly interpretedlanguages) to be able to integrate seamlessly with otherlanguages. Java C# C++ Paython Visual basic With All .net With With With c c,c++ languages c,assembler c,c++,javaBuilt-In Security:language implementations ability to determine whether or not apiece of code comes from a trusted source (such as the usershard disk), limiting the permissions of the code if it does not. Java C# C++ Paython Visual basic Yes Yes No No No

×