Packages always in scope

Some built-in packages are always in scope. You do not need to use fully qualified type names or the uses operator for types in these packages, which include the following:

  • gw.lang.*
  • java.lang.*
  • java.util.*
  • dynamic.*
  • The default, empty package
  • entity.*
  • typekey.*
  • pcf.* – only for expressions inside PCF files.
  • productmodel.*

List

The Gosu type system performs special treatment for the type List. Gosu resolves List to java.util.List in general use but to java.util.ArrayList if code creates an untyped list. For example, the following code creates an ArrayList:

var x = {}