摘要:
The subject invention pertains to a system and method of extending programming languages to enable static inheritance. In particular, static subclasses can be defined which extend class functionality and/or behaviors without extending base class state. The subclasses can be specified to include static fields as well as static or instance methods and/or properties that provide a more specific interpretation of an object without extending the state thereof. Furthermore, a static subclass can be specified to provide for type aliasing. Casting is also enabled in both directions between base class type and derived class type in a convenient manner without run-time performance penalties. According to one aspect of the invention, the disclosed systems and methods can be employed to create specific programmatic context, for instance for accessing, manipulating, and type checking external data (e.g., XML).
摘要:
The subject invention pertains to a system and method of incorporating collation information into data types. In particular, the subject invention provides for parameterizing data types with collation information such that a comparison between two different collations generates a static-type error rather than a run-time error. Additionally, the invention affords for conveniently working with localized data types to allow generic parameterization over collations as well as ordinary types. In the context of strings, the present invention enables concurrent use of strings in multiple languages and facilitates the correct handling thereof.
摘要:
Systems and methods that enhance a programming language with late binding via employing expressions of the form “Expression” in syntactic positions—wherein previously only compile-time constants were allowed. In a related aspect, the subject innovation can parameterize over a member name, via examining the grammar of the language (and all the available helpers) and replace identifiers or constants with an expression(s).
摘要:
A computer-implemented system for representing data comprises a position indicator that indicates a position of a datum within a group, a name indicator that optionally names the datum, and a value of the datum. A type to be assigned to the datum is derived from at least one of a name of the datum and the position of the datum within the group. Methods of using the system are also provided.
摘要:
The subject disclosure pertains to computer programming languages and translation or conversion thereof. Rather than a complicated semantics preserving translation or conversion from a first source language to a second target language, the conversion can be one of syntax. The conversion can be accomplished, for example, via employment of a map that defines the relation between the syntax of the first language and the second language. The semantics of at least a part of the first language can be defined by the second target language. Thus, the first language can be open-ended and/or semantically extensible based on the second language.
摘要:
An object-oriented interface for providing access to stored data comprises a data enumeration module that provides an object-oriented view to at least one stored first datum that is not an object created by the interface. The interface also includes a scanning module that cooperates with the data enumeration module to change the view from the stored first datum to another datum. Methods for using the interface are also provided.
摘要:
The subject disclosure pertains to lambda expressions and the employment of such expressions in imperative and/or object-oriented computer programming languages. Lambda expressions can be employed in conjunction with methods (e.g., arguments, assignment . . . ) to provide a more concise and functional manner of code specification. Further, lambda expressions can participate in type inference and checking as well as overload resolution, among other things.
摘要:
Multiple programming languages can be embedded and supported within a single source. Programs nested with syntax from a plurality of languages (e.g., C#, SQL, XML . . . ), among other things, enable users to avail themselves of advantageous aspects of different languages for particular tasks. Language services that provide language specific functionality including but not limited to formatting, intelligent assist, auto completion, and coloring, can be employed and switched between to afford support for their respective languages in a mixed language source program. Similarly, mixed language programs can be compiled with language specific services or systems such as parsers, scanners and the like to process corresponding code portions.
摘要:
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.
摘要:
An architecture that leverages support for markup language operations, e.g., extensible markup language (XML) queries, via a lightweight application program interface (API). The API defines an object model that can simplify construction of XML values in languages that do not natively support XML. The novel aspects of the described innovation can enable query languages to be factored into general operations (e.g., mapping, filtering, sorting, and/or projection of functions) on collections on one hand, and a set of domain specific operations (e.g., navigation, construction and modification) on the elements of these collections on another hand. The subject API can support creation of XML data that is node centric (e.g., context-free). Accordingly, nodes do not have to be constructed within the context of a document. Additionally, aspects can enable expression-oriented interface mechanisms as opposed to the imperative statement-oriented style interfaces used in connection with traditional interface mechanisms (e.g., DOM).