views:

180

answers:

3

What is the point of type definition on method parameters on Caché Object (from Intersystems) since after it's pre-compiled to the .int format, it removes any typing information, thus making no difference at all?

A: 

If you're writing ANSI M code, you shouldn't have types at all. My guess is that this is specific to Intersystems code.

Matthew Cole
Yes, it shouldn't be there because it doesn't make any difference. It's just a fake typing feature like many others fake features.
Frank Fiuza
+1  A: 

Those types aren't used/checked internal to Cache code, but they are used when you expose your classes via XML, SQL, etc.

One would hope that in a future version Intersystems would start doing some compile-time type checking, but that may be too much to ask.

Clayton
A: 

There aren't really datatypes in Cache, so there is no type checking.

danimajo