a type system is a collection of rules that assign a property called a type to the various constructs—such as variables, expressions, functions or modules— that a computer program is composed of.

learn more… | top users | synonyms (1)

10
votes
3answers
752 views

How do existential types differ from interfaces?

Given the existential type T = ∃X.{op₁:X, op₂:X→boolean} and this generic Java interface: interface T<X> { X op₁(); boolean op₂(X something); } What are the fundamental differences ...
8
votes
9answers
2k views

Mission critical embedded language [closed]

Maybe the question sounds a bit strange, so I'll explain a the background a little bit. Currently I'm working on a project at y university, which will be a complete on-board software for an ...
7
votes
2answers
444 views

Values, types, kinds, and…?

We all know what a value is. A type is the type of a value. A kind is (loosely) the type of a type. A type constructs a value; a kind constructs a type. So what is the type of a kind, a thing that ...
11
votes
1answer
728 views

(Dis-)advantages of structural typing

I’ve just watched this talk by Daniel Spiewak where he talks about the advantages of structural typing as compared to Scala’s ans Java’s nominal typing. One example for this difference would be the ...
16
votes
6answers
7k views

Is hungarian notation a workaround for languages with insufficiently-expressive (i.e. Haskell-style) static typing?

Edit To be clear, I'm not talking about annotation variable names with the data type, but rather with information about the meaning of the variable in the context of the program. For example, a ...
1
vote
4answers
438 views

Teaching programmer looking for a simple statically and weakly typed language

I'm trying to illustrate the differences between the four different type systems -- static vs. dynamic typing and weak vs. strong typing. Dynamic + weak = JavaScript Dynaimc + strong = Python ...
0
votes
4answers
599 views

About languages strongly typed with late binding, do they make sense?

I never learnt anything about VB6 (and I dont want to) but I wanted to search for bad things in computer software, so my first though was VB6. So for example, VB6 was strongly typed with late ...
3
votes
1answer
557 views

C# type system and dynamic type

I'm writing a paper about the C# (and Go) type system with focus on the dynamic aspect. Does anybody have suggestions for papers/literature? The things I found don't go much into detail. I would ...
2
votes
1answer
359 views

static languages or dynamic languages? [closed]

What is the exact border between the static and dynamic languages? I mean I am told the following parameters are the deciding factors: Compilation or interpretation Typing Runtime generation Dynamic ...
14
votes
10answers
4k views

Why are inheritance and polymorphism so widely used?

The more I learn about different programming paradigms, such as functional programming, the more I begin to question the wisdom of OOP concepts like inheritance and polymorphism. I first learned ...
18
votes
24answers
1k views

Interesting or unique types in programming languages? [closed]

We have all seen integer, floating point, string, and the occasional decimal type. What are some of the most strange or unique or useful types you have encountered, useful or not?
15
votes
5answers
4k views

What arguments are there in favor of weak typing?

This came up in a discussion with a friend, and I found myself hard-pressed to think up an any good arguments. What benefits do weak typing confer?
6
votes
3answers
335 views

What are some reasonable stylistic limits on type inference?

C++0x adds pretty darn comprehensive type inference support. I'm sorely tempted to use it everywhere possible to avoid undue repetition, but I'm wondering if removing explicit type information all ...
4
votes
4answers
210 views

objects, classes, types

How does an object oriented programmer understand the word "type"? I'm not aware of there being a type theory for object oriented programming because whenever someone mentions type theory it is always ...
28
votes
12answers
3k views

Is Haskell's type system an obstacle to understanding functional programming?

I'm studying Haskell for the purpose of understanding functional programming, with the expectation that I'll apply the insight that I gain in other languages (Groovy, Python, JavaScript mainly.) I ...
19
votes
9answers
22k views

Type Casting variables in PHP: Is there a practical example?

PHP, as most of us know, has weak typing. For those who don't, PHP.net says: PHP does not require (or support) explicit type definition in variable declaration; a variable's type is determined ...
46
votes
6answers
3k views

Dynamically vs Statically typed languages studies

Do there exist studies done on the effectiveness of statically vs dynamically typed languages? In particular: Measurements of programmer productivity Defect Rate Also including the effects of ...
15
votes
6answers
508 views

Should all programmers learn at least one very-high-level language? [closed]

One mandatory course I took in uni was about functional and logical programming languages (Haskell and Prolog). It was mildly interesting, and most I talked to showed even less interest to the course ...
26
votes
9answers
3k views

Do dynamic typed languages deserve all the criticism? [closed]

I have read a few articles on Internet about programming language choice in the enterprise. Recently many dynamic typed languages have been popular, i.e. Ruby, Python, PHP and Erlang. But many ...