- Script.NET
Infobox programming language
name = Script.NET
paradigm =Imperative
designer =
developer =
latest_release_version =
latest_release_date =2007-10-02
typing = Dynamic
implementations =
dialects =
influenced_by = Java Script
influenced =
operating_system =
license = Free
website =Script .NET or S# is a
metaprogramming language that provides scripting functionality in Microsoft .NET applications allowing execution of custom functionality in run-time. It can be used as VBA in Microsoft Office application. The syntax of Script.NET is similar toJavaScript language. It is designed to be simple and efficient scripting language allowing to customize .NET applications. The language has real run-time interpreter. It is executed without generating additional in-memory assemblies.Script.NET is an open-source project.
Metaprogramming FeaturesScript .NET has a special quotation operator < [ program ] > which returns AST of a given program. The AST of the current program may be accessed with prog object.
Here is an example:
The < [ ... ] > operator and prog object allows Script.NET to generate new scripts or modify existing script at the run-time.
Generalized Objects
"'Script.NET includes so-called Mutantic Framework which introduces a special kind of "meta" objects for controlling objects of any type. It is composed of set of classes. On top of which is DataMutant"' class. It implements several principles of mutant object:
Definition:Mutant is a special object which could have all properties (fields, methods, etc), and may be converted to any type (or assigned to object of any type). The semantics of such conversion (or assignment) is pragmatically conditional.
There is a special operator := called Mutantic or Generalized assignment. Its purpose is to assign values of DataMutant fields to corresponding fields of an object of any type.
"Example". Creation and Usage of MObject:
Examples:
Hello world Bubble sort functionRSS Readertack
Stack limited to 10 elements using
Design by contract featureimilar Languages
*
L Sharp.NET - Lisp-like scripting language for .NET
* Boo - a Python Like language for .NET platform
*IronPython - an implementation of Python for the .NET platform, similar toJython .
*Nemerle - a high-level language for the .NET platform.External links
* [http://www.codeplex.com/scriptdotnet Latest release]
* [http://www.protsyk.com/scriptdotnet/ Script.NET Homepage]
* [http://www.protsyk.com/scriptdotnet/examples.html Code Examples]
Wikimedia Foundation. 2010.