Hacker News new | ask | show | jobs
by TimJYoung 5567 days ago
"This includes things like being able to easily lookup an object's class, documentation, methods, properties, uses (is it a sequence? is it a map?, etc.)."

Most decent OO, statically-typed compilers allow for runtime type information. Delphi (native) and the .NET compilers allow you to query all sorts of information about a given object instance, including its class name, properties, methods, etc. Here's some links on Delphi's native compiler RTTI and attributes:

http://stackoverflow.com/questions/2217068/why-should-i-care...

http://robstechcorner.blogspot.com/2009/09/so-what-is-rtti-r...

Object instances in environments like .NET and Delphi are inherently dynamically-typed.

Statically-typed languages provide the safety of checking the "stupid stuff" during compilation without sacrificing the flexibility of using dynamic types in the form of classes. And many do so without any major compilation overhead (Delphi and .NET compilers are very fast).