Solved

Strongly Typed Language

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

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

Andrew
0
Comment
Question by:andrewyu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 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