Architecture that extends types using extension methods
Abstract
Architecture that extends existing types including constructed and sealed types using extension methods. Extension methods are static methods that can be invoked using instance method syntax. Extension methods are declared by specifying the keyword “this” as a modifier on the first parameter of the methods. Extension methods have all the capabilities of regular static methods. In addition, once imported, extension methods can be invoked using instance method syntax. Also disclosed are rules for importing extension methods, and extension method invocations. Extension methods are imported through using-namespace-directives. In addition to importing the types contained in a namespace, a using-namespace-directive imports all extension methods in all static classes in the namespace. In effect, imported extension methods appear as additional methods on the types that are given by their first parameter and have lower precedence than regular instance methods.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 18 · Forward citations: 9.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method of extending data model and operations without needing to modify existing codes, the method comprising: receiving a static type for extension processing; extending the type by adding an extension method to the static type, wherein the extension method is declared using declaration syntax providing a compiler with sufficient information to statically process invocation of the extension method; statically processing invocation of the extension method by treating the extension method as a normal instance method of the type the extension method extends rather than as
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (9 of 9 total)
References Cited — Backward Prior Art (18)
Non-Patent Literature (5)
- Abelson, et al., Structure and Interpretbn of Computer programs. The Rules of Evaluation [online], Cambridge, MA: The MIT Press. 1996 [retrieved on Jan. 30, 2007]. Retrieved from the Internet: CURL:http:llmitpress.mit.edu/sicp/full-text/sicp/book/node56.html>,(chapter 3.2.1).
- Barcndrfgt, The Impact of the Lambda Calculus and Computer Science, The Bulletin of Symbolic Logic [online], Jun. 1997 [retrieved on Jan. 30, 2007] Retrieved from the Inlernet:.
- Barcndrfgt, The Impact of the Lambda Calculus and Computer Science, The Bulletin of Symbolic Logic [online], Jun. 1997 [retrieved on Jan. 30, 2007] Retrieved from the Inlernet:<UPL;https://www.rncs.vuw.ac.nz/courses/COMP432/2006T2/docs/BarLarnbda.pdf>.
- Bonifati et al. "Pushing Reactive Services to XML Repositories Using Active Rules," ACM 2001, May 1, 2001, 9 pages, Hong Kong.
- C#: Overview of C# 3.0, Draft 2, Jul. 2005, 18 pages.