News for hackers. Stuff that matters.
Re:MCP's Disregard for 40 Years of RPC Best Practices by dboreham on Saturday August 09, 2025 @04:59PM (#44850161)
imho it's a fantasy to expect type safe protocols except in the case that both client and server are written in the same (type safe) language. Actually even that doesn't work. What language actually allows a type definition for "ISO-8601 timestamp" that's complete? Everything ends up being some construction of strings and numbers, and it's often not possible to completely describe the set of valid values except by run-time checking, certainly beyond trivial cases like "integer between 0 and 10".
Re:MCP's Disregard for 40 Years of RPC Best Practices by mgh95 on Saturday August 09, 2025 @05:22PM (#44850354)
> What language actually allows a type definition for "ISO-8601 timestamp" that's complete?

It is absolutely possible to do this, and to generate client code which complies with ISO-8601 in JS/TS. Large amounts of financial services would not work if this was not the case.

See the c# support for ISO-8601 strings: https://learn.microsoft.com/en-us/dotnet/standard/base-types...

Re:MCP's Disregard for 40 Years of RPC Best Practices by whoknowsidont on Saturday August 09, 2025 @06:28PM (#44850922)
You've misunderstood his statement and proven his point.

`DateTime` is not an ISO-8601 type. It can _parse_ an ISO-8601 formatted string.

And even past that, there are Windows-specific idiosyncrasies with how the `DateTime` class implements the parsing of these strings and how it stores the resulting value.

Re:MCP's Disregard for 40 Years of RPC Best Practices by mgh95 on Saturday August 09, 2025 @09:19PM (#44851971)
> `DateTime` is not an ISO-8601 type. It can _parse_ an ISO-8601 formatted string.

This is exactly the point: a string is just a data interchange format in the context of a DateTime, and C# provides (as far as I can tell) a complete way of accessing the ISO-8601 specification on the language object. It also supports type-safe generation of clients and client object (or struct) generation from the ISO-8601 string format.

> And even past that, there are Windows-specific idiosyncrasies with how the `DateTime` class implements the parsing of these strings and how it stores the resulting value.

Not really. The windows statements on the article (and I use this on linux for financial services software) are related to automated settings of the preferences for generated strings. All of these may be set within the code itself.

Re:MCP's Disregard for 40 Years of RPC Best Practices by whoknowsidont on Saturday August 09, 2025 @11:43PM (#44852597)
>The windows statements on the article

That was based on decades of experience in .NET and Windows. Not the article ;).

Re:MCP's Disregard for 40 Years of RPC Best Practices by mgh95 on Sunday August 10, 2025 @12:24AM (#44852744)
Ah. For what its worth, the only windows machine I have is used pretty much only to run steam. I can't really comment on c# on windows.
Re:MCP's Disregard for 40 Years of RPC Best Practices by cle on Saturday August 09, 2025 @05:19PM (#44850330)
Generally you'd use a time library to model ISO-8601 dates in a typesafe way. Some fancier languages might have syntactic support for it, but they ultimately serve the same purpose.

Related but distinct from serialization.

Re:MCP's Disregard for 40 Years of RPC Best Practices by xpe on Saturday August 09, 2025 @10:18PM (#44852277)
Let's not focus on 100% or nothing. Let's focus on better and worse.
Re:MCP's Disregard for 40 Years of RPC Best Practices by int_19h on Sunday August 10, 2025 @10:16PM (#44860221)
Not only it's possible, but it has been done many times before, and a lot of modern business software is still built on that. You know that old fashioned XML thing? It has schemas, and those schemas come with a lot of predefined types including, specifically, a whole family of ISO 8601-related types:

https://www.w3.org/TR/xmlschema-2/#isoformats

And so you can write a web service in Java and use it from C#, or whatever.