Reply to post: "then theoretically any other language could consume that definition"

Microsoft reveals xlang: Cross-language, cross-compiler and coming to a platform near you

LDS Silver badge

"then theoretically any other language could consume that definition"

That was what COM tried to achieve (and before it, DCE RPC, on which a lot of COM is based).

The issue are not languages who have compatible data types - usually compiled languages that use the underlying CPU types, and their in-memory structures are quite "simple", and can be easily addressed using pointers - the issues are often in the interpreted ones (and some vm ones), where data type often have their own representation, and can't be easily passed around.

You can see it easily with "string" types - even compiled languages where the "string" type is native can use different ways to implement it internally - so they are not compatible across calls into different ones (but maybe as read-only buffers).

That's why COM had its own datatypes and all that marshaling stuff to convert them to and from, giving each side of the call something it can use.

Another attempt is doing what XML and JSON do - turn everything into some character-based format, and still needing code to convert to and from (which is usually far less performant than using native types when possible).

Of course, if you can force different languages to abide to a common standard, it's much easier.

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

Biting the hand that feeds IT © 1998–2019