User loginNavigation |
archivesInteresting old gem: Prop does pattern matching in C++I wonder why I haven't heard more about Prop. It lets you do ML-style pattern matching in C++. Perhaps a nifty way to sneak in a little functional programming at work. (noob question) method parameters in co-and-contravariance issueIs co- and contravariance a concept related to inheritance or can it apply to normal method parameters ? e.g. In java
class Food{}
class Grass extends Food {}
class Antelope extends Food {}
public class Main2
{
public static void main(String[] args) {
Main2.eat( new Food() );
Main2.eat( new Grass() );
Main2.swallow( new Food() ); // compile-time error
Main2.swallow( new Grass() );
}
public static void eat( Food f ) {}
public static void swallow( Grass f ) {}
}
Am I correct in my reasoning ? Thanks Correct mathematical symbol to represent "subtype"If this question doesn't make sense, it's probably because I might be confused with the term subtype. What is the correct mathematical symbol for subtype ?
Thanks. Arc is releasedMake of it what you will, but Arc is now officially released.
This part of Graham's announcement is a gem:
This sure made me smile... |
Browse archivesActive forum topics |
Recent comments
2 days 5 hours ago
3 days 2 hours ago
4 days 7 hours ago
4 days 7 hours ago
1 week 2 days ago
1 week 2 days ago
1 week 2 days ago
4 weeks 3 days ago
5 weeks 1 day ago
5 weeks 1 day ago