Solved

Strongly Typed Language

Posted on 1997-12-29
2
586 Views
Last Modified: 2013-11-20
MFCer,

What is Strongly Typed Language ? Is C++ a Strongly Typed Language ?

Andrew
0
Comment
Question by:andrewyu
2 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1313160
What do you mean typed language?
0
 
LVL 5

Accepted Solution

by:
yonat earned 10 total points
ID: 1313161
A type is the set of messages that an object understands. In C++ it means all its public member functions, including inherited ones.

A typed language is a language that support types :-) Many languages only support types weakly, like Perl, or good-old Basic.

C++ let's you define your own types (using classes). It protects you from sending a message (function call) to an object that can't understand it. This check is done at compile time, or statically. Therefore, C++ is a statically typed language.

In SmallTalk, this checking is done at run-time. Therefore SmallTalk is a dynamically typed language.

About strong typing:

The better you can define the messages that an object can receive - the stronger the typing. For example, in Eiffel you can define pre- and post-conditions for each message. So Eiffel's typing is stronger than that of C++. But C++'s typing is stronger that that of, say, Visual Basic.

So "strong" is a bit like "tall" - it's relative. Most people out of eiffel.com would say that C++ is strongly typed.

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video discusses moving either the default database or any database to a new volume.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now