Quantcast
Channel: Question and Answer » type-systems
Browsing all 47 articles
Browse latest View live

Practical implementation of Hindley–Milner with typeclasses — matching vs...

I’m trying to get a deep understanding of a (great) paper “Typing Haskell in Haskell”. I’m having difficulties understanding the implementation of two methods there — the mgu and match. Let’s talk...

View Article



Interface hierarchy design for separate domains

There are businesses and people. People could be liked and businesses could be commented on: class Like class Comment class Person implements iLikeTarget class Business implements iCommentTarget Likes...

View Article

What is the evidence that an API has exceeded its orthogonality in the...

Wikipedia defines software orthogonality as: orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to...

View Article

Is RDF subsumption the same as nominal subtyping?

In order for to infer a class A subsumes a class B, one or more T-Box statements have to be defined. If one assumed that a class in RDF is a type, would subsumption be the same as nominal subtyping?

View Article

When is type testing OK?

Assuming a language with some inherent type safety (e.g., not JavaScript): Given a method that accepts a SuperType, we know that in most cases wherein we might be tempted to perform type testing to...

View Article


Java: method takes varargs of unrelated types

I have a Java factory method with a varargs array of Objects at the end. The array can contain any combination of Strings and ScaledJpegs. The theory being that an HTML table cell can contain any...

View Article

The Definition of “Strong Type Systems” [closed]

I saw Martin Odersky’s “The Trouble with Types” presenstaion. He divided programing-languages in two dimensions in the “Type Systems Landscape” chart; A “Static/Dynamic” dimension and A “Strong/Weak”...

View Article

Language with extensible type system?

Is there a practical programming language that has an extensible type system? Or alternatively, an add-on type system that can be used with existing languages? With extensible I mean that the typing...

View Article


Is 'design with types first' ultimately the same as 'design with interfaces...

In Object Oriented Programming, we’re taught to think in terms of Polymorphism (the idea that the implementation is decoupled from the interface – and that it makes sense to think of the interface...

View Article


How does a dependently typed programming language cope with mutability?

I have been investigating on the viability of a “normal” programming language with dependent types. Think for example in Java and add dependent types to it. One difficulty which I have found is that...

View Article

Type inference in Golang/Haskell

I’ve read that Go doesn’t actually have true type inference in the sense that functional languages such as ML or Haskell have, but I haven’t been able to find a simple to understand comparison of the...

View Article

Is there a way to define a consistent date in a dependent type language?

I am looking for an example (if exists at all) of a definition of a date in a programming language (Idris, Coq, etc) that features dependent types where such definition is consistent and type safe by...

View Article

Why is type inference useful?

I read code way more often than I write code, and I’m assuming that most of the programmers working on industrial software do this. The advantage of type inference I assume is less verbosity and less...

View Article


Isomorphism between algebraic data-types

I have two types of trees in Haskell, defined as the least solution of the following equations: $T_1(A) cong 1 + A + T_1(A) times T_1(A)$ $T_2(A) cong 1 + A times T_2(A) + T_2(A) times T_2(A)$ In...

View Article

Are the types that show monads are more powerful than continuations revealing...

In 1992 in the paper Imperative Functional Programming, Simon Peyton Jones and Philip Wadler write: So monads are more powerful than continuations, but only because of the types! It is not clear...

View Article


Correct terminology in type theory: types, type constructors, kinds/sorts and...

In an answer to a previous question, a small debate started about correct terminology for certain constructs. As I did not find a question (other than this or that, which is not quite the right thing)...

View Article

type infered statically typed languages?

are there any typeless typesafe languages? By typesafe I mean types are checked at compile time. By typeless I mean types are not declared. I know this is easier than it sounds, maybe even impossible...

View Article


Why do you need higher kinds?

Some languages allow for classes and functions with type parameters (such as List<T> where T may be an arbitrary type). For example, you can have a function like: List<S> Function<S,...

View Article

class in OOP language and type

In programming language theory, a type is a set of values. E.g. the type “int” is the set of all integer values. In OOP languages, a class is a type, is it? When a class is defined with more than one...

View Article

Non-objected oriented type theories that can express the $nu Obj$ calculus

Odersky et al.’s $nu Obj$ calculus [1] adds just enough dependent typeness on top of object oriented programming to express interfaces that define types (and consequently module systems and other...

View Article
Browsing all 47 articles
Browse latest View live




Latest Images