Definition of a type
Conceptually, I used to think of types as sets. However, I think I’ve seen people wishing to distinguish types A
, B
even if they represent identical collections of values. So I figured a better definition of type is a pair (type_name, set)
, where two different types cannot have the same first element.
Definition of a type
Conceptually, I used to think of types as sets. However, I think I’ve seen people wishing to distinguish types A
, B
even if they represent identical collections of values. So I figured a better definition of type is a pair (type_name, set)
, where two different types cannot have the same first element.
Definition of a type
Conceptually, I used to think of types as sets. However, I think I’ve seen people wishing to distinguish types A
, B
even if they represent identical collections of values. So I figured a better definition of type is a pair (type_name, set)
, where two different types cannot have the same first element.
Would it make sense to add parameters of an inferred type to inheritance?
I’ll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its subclasses. Obviously, this could never go into interfaces because it defines how classes will be implemented, an immediate contradiction. Here are two examples:
Would it make sense to add parameters of an inferred type to inheritance?
I’ll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its subclasses. Obviously, this could never go into interfaces because it defines how classes will be implemented, an immediate contradiction. Here are two examples:
Would it make sense to add parameters of an inferred type to inheritance?
I’ll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its subclasses. Obviously, this could never go into interfaces because it defines how classes will be implemented, an immediate contradiction. Here are two examples:
Would it make sense to add parameters of an inferred type to inheritance?
I’ll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its subclasses. Obviously, this could never go into interfaces because it defines how classes will be implemented, an immediate contradiction. Here are two examples:
Would it make sense to add parameters of an inferred type to inheritance?
I’ll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its subclasses. Obviously, this could never go into interfaces because it defines how classes will be implemented, an immediate contradiction. Here are two examples:
Would it make sense to add parameters of an inferred type to inheritance?
I’ll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its subclasses. Obviously, this could never go into interfaces because it defines how classes will be implemented, an immediate contradiction. Here are two examples:
How do languages with Maybe types instead of nulls handle edge conditions?
Eric Lippert made a very interesting point in his discussion of why C# uses a null
rather than a Maybe<T>
type: