Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Compare Programming Languages - Programming Languages - Lecture Slides, Slides of Programming Languages

This lecture discusses 22 different features regarding the programming concept. This lecture compare different programming languages like C++, C, Java, Python and Visual basic with respect to each one of 22 features. Difference

Typology: Slides

2012/2013

Uploaded on 11/04/2013

palmoni
palmoni 🇮🇳

4.5

(2)

80 documents

1 / 22

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Comparison among
Programming Languages
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Compare Programming Languages - Programming Languages - Lecture Slides and more Slides Programming Languages in PDF only on Docsity!

Comparison among

Programming Languages

Lecture Outline[ 1 / 2 ]

  • Object Orientation
  • Static vs. dynamic typing
  • Generic classes
  • Inheritance
  • Feature renaming
  • Method overloading
  • Operator overloading
  • Higher Order Functions and Lexical Closures
  • Garbage Collection

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-paradigm Hybrid Particular 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

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 – multiple multiple multiple None interfaces Single class – multiple 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

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

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

Access Control

  • ability for a modules implementation to remain hidden behind its

public interface.

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

  • protected Public – private
  • protected Public – private
  • 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

Regular Expressions

  • pattern matching constructs capable of recognizing the class of

languages known as regular languages.

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

Pointer Arithmetic

  • ability for a language to directly manipulate memory addresses and

their contents.

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