Post 9iSL9mjU973IRS4n8C by kellerfuchs@vulpine.club
(DIR) More posts by kellerfuchs@vulpine.club
(DIR) Post #9iRmDPAeC4Yw81lujY by cwebber@octodon.social
2019-05-03T19:16:58Z
0 likes, 0 repeats
some day I'm going to explain why static type analysis requires language runtime centralization and I'll be boiled alive by a segment of the fediverse
(DIR) Post #9iSL9m2whH1aJWAopE by cj@mastodon.technology
2019-05-03T19:22:38Z
0 likes, 0 repeats
@cwebber What do you mean by language runtime "centralization" ?
(DIR) Post #9iSL9mWiuYqNns6bEu by cwebber@octodon.social
2019-05-03T19:26:53Z
0 likes, 1 repeats
@cj Some computation may happen locally and may be statically analyzed safely. But if computation happens over a a mutually suspicious actor-style network, you actually *don't know* the remote type for sure... you know its *alleged* type. And you don't know the types of the objects that *that* object is accessing (or what objects it has access to).Checks can/must be performed, but must happen at the boundary between mutually suspicious machines, thus are runtime checks (contracts/guards).
(DIR) Post #9iSL9mjU973IRS4n8C by kellerfuchs@vulpine.club
2019-05-03T20:38:08Z
1 likes, 1 repeats
@cwebber @cj Something that should illustrate it quite well is that you can't actually implement a RPC interaction without a runtime check, in a sensibly-typed language. At least not without unsafe code.That's because the communication primitive you use carries unstructured data (say, bytes) and to turn it into structured data you need to parse it: the parser is already a form of runtime check, as it will reject malformed data.Depending on how your RPC system is engineered, you'll then do some further, semantic analysis on the structured data, like validating it conforms to a given schema/datatype, in the process of converting it to a more specific type.(Sorry for the delete&repost, this was accidentally made followers-only.)