Re: Strong Types ?

torbenm@app-6.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
27 Apr 2007 11:25:48 -0400

          From comp.compilers

Related articles
Strong Types ? hossein.rohani@gmail.com (gygulance) (2007-04-26)
Re: Strong Types ? torbenm@app-6.diku.dk (2007-04-27)
Re: Strong Types ? scgupta@yahoo.com (Satish Chandra Gupta) (2007-04-27)
Re: Strong Types ? oliverhunt@gmail.com (oliverhunt@gmail.com) (2007-04-28)
Staic typechecking in OO [was Re: Strong Types ?] Sebastian.Kaliszewski@softax.pl (Sebastian Kaliszewski) (2007-05-04)
Re: Strong Types ? kamalpr@gmail.com (IndianTechie) (2007-05-21)
| List of all articles for this month |
From: torbenm@app-6.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: 27 Apr 2007 11:25:48 -0400
Organization: Department of Computer Science, University of Copenhagen
References: 07-04-123
Keywords: types
Posted-Date: 27 Apr 2007 11:25:48 EDT

gygulance <hossein.rohani@gmail.com> writes:


> I faced a question during my research on desing and implementation of
> programming language. The question arises from area of type binding
> and checking in design of programming languages. question :
> Can we call a programming language which has both static type
> checking and static type binding a strongly type programming
> language; if so why and is there any programming language with these
> characteristics.


The phrase "strong types" is often used to be synonymous with "static
types", i.e., compile-time types, but the proper use (at least among
people who do research on type systems) is that it means that all type
errors are caught at some point, i.e., that at no time will the
program use a value of one type as if it was of another type.


As an example, let us look at C. All type-checking in C is done at
compile-time, but it is not strongly typed, as you can put a value
into a union type and take it out using anouther of the types in the
union, thereby using (for example) a float as a function pointer,
which is likely to cause your program to crash.


Another example is Scheme. It does all of its type-checking at
runtime, immediately before doing an operation on the value. But it
will discover if the value is of the wrong type, so it is strongly
typed.


Standard ML is both strongly and statically typed.


But to return to your question: If "type binding" means what I think
it means, if a language has both static type checking and type
binding, it can be strongly typed, but it does not need to be.


Torben


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.