Difference between revisions of "Soft Typing System"
(Created page with "== URL Typing and Contextual Expectations == {{LLMHint}} === Prompt: === Let's take the example of URL which are not typed by design as per Tim Berner's Lee original idea. Url...") |
(No difference)
|
Latest revision as of 13:36, 27 April 2025
URL Typing and Contextual Expectations
⚠️ LLM-generated content notice: Parts of this page may have been created or edited with the assistance of a large language model (LLM). The prompts that have been used might be on the page itself, the discussion page or in straight forward cases the prompt was just "Write a mediawiki page on X" with X being the page name. While the content has been reviewed it might still not be accurate or error-free.
Prompt:
Let's take the example of URL which are not typed by design as per Tim Berner's Lee original idea. Urls could have been typed but it was decided to have more freedom. My reasoning would be that a type of something like a URL should be known on the using / linking side and stated e.g. this his an URL pointing from a page page to an author. But this should be just a hint with e.g. expected cardinalties. E.g. in a physics paper the expected authors cardinality is easily in the dozens while in other domains that is rare. The target side should make a self assessment e.g. "i consider my self a normal book author page" or " i consider myself an exotic book author page since the original author passed away - the daughter took over but was eventually sued and then ..."
Generated Response:
Contextual Typing with Expectation Signaling
A system can implement flexible typing where:
- Source-Declared Intent: The origin of a relationship (like a link) declares its intended semantic meaning and expected cardinality properties without enforcing rigid constraints. This acts as a "hint" rather than a strict type.
- Domain-Specific Cardinality Expectations: The system recognizes that reasonable cardinality varies by domain context (e.g., physics papers typically having many authors versus novels typically having one or few).
- Target Self-Classification: Resources self-identify their conformance to typical patterns or declare their exceptional nature ("normal author page" vs. "exceptional case with complex history").
- Graceful Degradation for Mismatches: The system handles cases where source expectations and target realities don't align, prioritizing functionality over strict enforcement.
This approach preserves the flexibility that made the web successful (following Berners-Lee's design) while adding a layer of semantic hints that improve predictability and optimization without introducing brittle constraints.
It's essentially implementing a "soft typing" system where types are suggestive rather than prescriptive, allowing the system to optimize for the common case while gracefully handling exceptions. This balances the freedom of untyped systems with the performance and predictability benefits of typed ones.
This concept could be formalized as an extension to our previous definitions, perhaps as "Expectation-Based Flexible Typing" - a middle ground between rigid typing and complete absence of type information.