Green (programming language)
From Wikipedia, the free encyclopedia
| This article may not meet the general notability guideline or one of the following specific guidelines for inclusion on Wikipedia: Biographies, Books, Companies, Fiction, Music, Neologisms, Numbers, Web content, or several proposals for new guidelines. If you are familiar with the subject matter, please expand or rewrite the article to establish its notability. The best way to address this concern is to reference published, third-party sources about the subject. If notability cannot be established, the article is more likely to be considered for redirection, merge or ultimately deletion, per Wikipedia:Guide to deletion. This article has been tagged since November 2007. |
| This article or section needs sources or references that appear in reliable, third-party publications. Primary sources and sources affiliated with the subject of the article are generally not sufficient for a Wikipedia article. Please include more appropriate citations from reliable sources, or discuss the issue on the talk page. This article has been tagged since November 2007. |
Green is a statically-typed object-oriented programming language which supports garbage collection, assertions, methods with variable number of parameters, parameterized classes, metaobjects, introspective reflection, and classes as first-class objects. The exception handling is completely object-oriented: it encapsulates exceptions and exception handling in classes, bringing all the power of object-oriented programming to the exception system. A type in Green is a collection of method signatures ― a class B is subtype of a class A if B has at least the method signatures of A, regardless B inherits from A or not. Every subclass is a subtype but not every subtype is a subclass.
Classes are objects, though classless. But they do have types and can be subtypes of normal classes. Then classes are first-class objects without the use of metaclasses. Whenever necessary, basic values such as 1, 6, ‘A’ or 3.14 are considered objects through automatic conversion to wrapper classes Integer, Char, Real, etc. This feature has been adopted recently by Java. In Green, the Any class, corresponding to Object in Java or Smalltalk, can receive any type, even 1, 6 or ‘A’.
The metaobjects of Green are surprisingly efficient and easy to use, a side-effect of being designed together with the language.

