Skip to main content

Questions tagged [typing]

type systems of programming languages

Filter by
Sorted by
Tagged with
19 votes
3 answers

ML function of type 'a -> 'b

Our professor asked us to think of a function in OCaml that has the type 'a -> 'b i.e. a function of one argument that could be anything, and that can return ...
Gilles 'SO- stop being evil''s user avatar
26 votes
1 answer

What are the major differences between row polymorphism and subtyping

I hear often that row-polymorphism is a better approach than subtyping, but I have difficulty finding anything comparing them in detail. I'm especially interested in the perspective of a user of the ...
Alex R's user avatar
  • 473
14 votes
1 answer

Why will the Hindley-Milner algorithm never yield a type like t1 -> t2?

I'm reading about the Hindley-Milner typing algorithm while writing an implementation, and see that, as long as every variable is bound, you'll always get either atomic types or types where the ...
Juan's user avatar
  • 765
8 votes
3 answers

ML functions from polymorphic lists to polymorphic lists

I'm learning programming in ML (OCaml), and earlier I asked about ML functions of type 'a -> 'b. Now I've been experimenting a bit with functions of type ...
Gilles 'SO- stop being evil''s user avatar
4 votes
2 answers

If dynamically typed languages are truly statically typed, unityped languages, what is the (finite) type expression of the one type?

Some claim that dynamically typed languages are in reality statically typed, unityped languages. This would imply to me that this one type should be expressible as a static, finite type expression, so ...
BlueBomber's user avatar
  • 1,297
3 votes
1 answer

Can type information be encoded in the untyped lambda calculus?

I'm going to take the few pieces of knowledge I have about lambda calculi and ask a pair of very uninformed questions :-) Is it possible to "embed" the corners of the lambda cube within the untyped ...
Aaron's user avatar
  • 131
2 votes
1 answer

Would adding recursive named functions to Simply typed lambda calculus make it Turing complete?

Say I have Simply typed lambda calculus, and add an assignment rule: <identifier> : <type> = <abstraction> Where ...
Juan's user avatar
  • 765
1 vote
2 answers

How is a type system related to a progam?

In another question about Lambda Calculus, Andrej Bauer made the comment: Lambda calculi of various forms are formal systems. They consist of abstract syntax (for terms and for types, if present),...
Guy Coder's user avatar
  • 5,101