News for hackers. Stuff that matters.
Re:Avoid Else, Return Early (2013) by dorgo on Monday March 26, 2018 @07:20PM (#16683626)
Don't you get problems with equal Signatures but different meaning or different scale? Example:

interface SomethingWithAge{ age(); }

class Person{ age(); // age in years }

function classify( SomethingWithAge item ){ if( item.age() < 20 ){ print( 'young') } else{ print( 'old' ); } }

p = new Person( 33 ); classify( p ) // prints 'old'

class Message{ age(); // age in milliseconds }

c = new Message( 231443 );

classify( c ); // prints 'old'

Re:Avoid Else, Return Early (2013) by spiralx on Tuesday March 27, 2018 @10:12AM (#16688538)
https://github.com/Microsoft/TypeScript/issues/202

It's in the roadmap, but discussions about it are still going on four years after the ticket was opened...