Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Gosu (programming language)

From Wikipedia, the free encyclopedia
Programming language
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This articleusesbare URLs, which are uninformative and vulnerable tolink rot. Please consider converting them tofull citations to ensure the article remainsverifiable and maintains a consistent citation style.Several templates and tools are available to assist in formatting, such asreFill (documentation) andCitation bot (documentation).(September 2022) (Learn how and when to remove this message)
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Gosu" programming language – news ·newspapers ·books ·scholar ·JSTOR
(February 2015) (Learn how and when to remove this message)
(Learn how and when to remove this message)
Gosu
DeveloperGuidewire and open source contributors
Stable release
1.18.6[1] Edit this on Wikidata / 28 June 2025; 5 months ago (28 June 2025)
Typing disciplinestatic
PlatformExecute on theJava Virtual Machine, statically and dynamically compiles tobytecode
OSany supporting JVM
LicenseApache License 2.0
Filename extensions.gs, .gsp, .gst, .gsx
Websitegosu-lang.github.io
Influenced by
Java,C#
Influenced
Kotlin

Gosu is astatically typedgeneral-purpose programming language that runs on theJava Virtual Machine. Its influences includeJava,C#, andECMAScript. Development of Gosu began in 2002 internally forGuidewire Software, and the language saw its first community release in 2010 under theApache 2 license.[2]

Gosu can serve as a scripting language, having free-form Program types (.gsp files) for scripting as well as statically verified Template files (.gst files). Gosu can optionally execute these and all other types directly from source without precompilation, which also distinguishes it from other static languages.

History

[edit]

Gosu is often described as a Java variant that introduces practical improvements while maintaining compatibility and interoperability with Java. The language originated in 2002 at Guidewire Software, where it was initially known asGScript, a scripting language designed for use within Guidewire applications.[3][4] As GScript evolved from a simple scripting tool into a general-purpose programming language, it was renamedGosu by its lead developer, Scott McKinney.

Originally created as a “glue language” to allow Guidewire customers to define business rules, Gosu quickly found broader use within the company’s products, supporting areas such as user interface bindings, templating, and document management. Over time, Gosu became the primary implementation language across Guidewire’s application suite, surpassing Java in overall usage.

Guidewire released Gosu0.7 beta to the public in November 2010, followed by0.8 beta in December 2010 and0.8.6 beta in mid-2011. These releases introduced several enhancements, including newtypeloaders that allowed Gosu to dynamically represent external data formats such as JSON and XML as native Gosu types.

Guidewire continues to use and support Gosu extensively within itsInsuranceSuite applications. While active development of new Gosu language features has been paused, the company continues to expand InsuranceSuite through RESTful APIs and integration frameworks accessible from both Gosu and Java.

Philosophy

[edit]

Gosu language creator and development lead, Scott McKinney, emphasizes pragmatism, found in readability anddiscoverability, as the overriding principle that guides the language's design.[5] For instance, Gosu's rich static type system is a necessary ingredient toward best of breed tooling viastatic program analysis, rich parser feedback,code completion, deterministic refactoring, usage analysis, navigation, and the like.

Syntax and semantics

[edit]

Gosu follows a syntax resembling a combination of other languages. For instance, declarations follow more along the lines ofPascal with name-first grammar. Gosu classes can have functions, fields, properties, and inner classes as members. Nominal inheritance and composition viadelegation are built into the type system as well asstructural typing similar to theGo programming language.

Gosu supports several file types:

  • Class (.gs files)
  • Program (.gsp files)
  • Enhancement (*.gsx files)
  • Template (*.gst files)

In addition to standard class types Gosu supports enums, interfaces, structures, and annotations.

Program files facilitate Gosu as a scripting language. For example, Gosu's Hello, World! is a simple one-line program:

print("Hello, World!")

Gosu classes are also executable a la Java:

classMain{staticfunctionmain(args:String[]){print("Hello, World!")}}

Data types

[edit]

A unique feature of Gosu is its Open Type System, which allows the language to be easily extended to provide compile-time checking and IDE awareness of information that is typically checked only at runtime in most other languages. Enhancements let you add additional functions and properties to other types, including built-in Java types such as String, List, etc. This example demonstrates adding a print() function to java.lang.String.

enhancementMyStringEnhancement:String{functionprint(){print(this)}}

Now you can tell a String to print itself:

"Echo".print()

The combination ofclosures and enhancements provide a powerful way of coding with Collections. The overhead of Java streams is unnecessary with Gosu:

varlist={1,2,3}varresult=list.where(\elem->elem>=2)print(result)

Uses

[edit]

This general-purpose programming language is used primarily inGuidewire Software's commercial products.

References

[edit]
  1. ^"Release 1.18.6". 28 June 2025. Retrieved16 July 2025.
  2. ^"Gosu Programming Language Released To Public".Slashdot. 2010-11-09.
  3. ^http://www.guidewire.com[bare URL]
  4. ^https://gosu-lang.github.io/[bare URL]
  5. ^McKinney, Scott."Language of the Month: Gosu".Dr. Dobb's Journal. Archived fromthe original on 18 December 2014.

Further reading

[edit]

Event

External links

[edit]
Portal:
Retrieved from "https://en.wikipedia.org/w/index.php?title=Gosu_(programming_language)&oldid=1319762193"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp