Reply to post:

It's Friday – and that means one thing: Yup, Microsoft's TypeScript 2.0 is out

kmac499

Strong typing at the poit of use is vital, Loose typing when passing things around is sometimes very useful for making generic code. Particularly with classes. So a function could generate a data handling object of say type objCustomer or objSale or objProduct which inherit from a general type clsTable.

This enables you to pass objTables around the system at will using the generic clsTable:methods but the precise 'table' used by that object only becomes important and visible at the point of use.

Might not suit the computer scientists amongst us but it works for me...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon