Questions tagged [type-theory]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
5 answers
429 views

Converting Dynamic Typing To Static Programatically

See: Type inference with duck typing - does this work? Why is it not used? And: General approach for proving decidability/undecidability Hello, I wanted to ask a theoretical question about type system ...
SeriousBusiness100's user avatar
2 votes
6 answers
607 views

What is the viability of engineering an integral type with values ranging from -1 to 254? Do types like this even exist?

In software engineering, often developers will utilize three different states of a signed integer, as a trilean: This tends to be quite typical: -1 - Represents something akin to a null pointer, as in ...
Anon's user avatar
  • 3,593
1 vote
2 answers
128 views

Adjective for function types on wether the values are received or sent

I don't know how to phrase this better, but I remember reading an article about type theory, that categorized the values being received by a function and the values being sent back from the functions. ...
Antoine Catton's user avatar
3 votes
5 answers
267 views

Does deciding about Liskov sub.princple compliance require a contract?

I have read two opinions on the subject. Let's assume the following simple code: class Enemy { public virtual void CheckHealth() { if (Life <= 0) Dispose(); } } ...
Ezoela Vacca's user avatar
2 votes
2 answers
3k views

When to use a SortedMap interface?

The rule in programming is to use the most general interface possible. But the difference between Map and SortedMap is more subtle. They compile to the same bytecode [I think] No additional safety is ...
djechlin's user avatar
  • 2,212
11 votes
2 answers
3k views

What are the practical implications of homotopy type theory in programming?

I am just beginning to learn Haskell, after coming from the JavaScript/Ruby worlds. I have come across https://github.com/HoTT and the Homotopy Type Theory book, which I am very eager to read. ...
Lance's user avatar
  • 2,587
15 votes
2 answers
2k views

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

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) ...
Frank's user avatar
  • 14.4k