Inside the G# language
The G# language itself is straightforward. Code is structured in packages, with executable sections defined as funcs. By default, G# uses the .NET System namespace, so you can use familiar constructs without having to learn different ways to do the usual things. If you don’t want to bring in System by default, you can disable imports as part of the compiler configuration.
Each function can take parameters and return values, with types declared as part of the parameter list. The parameter list can end with type declarations for any returns, so you can ensure that you’re returning the expected data. Most types include lengths, for example int64, though there are aliases for familiar types as used in other languages. Strings allow you to add alignments and formatting information. In addition to functions, you can define structs and classes to help handle variables, with structs handling values and classes handling references. Similarly, data structs and classes let you treat variables as data, applying copies and assigning values.
Much of the language structure will be familiar, especially if you’re used to working with languages like Go. There are some interesting shortcuts, using features like if let to check for nulls when parsing function parameters. You can use if let alongside G#’s exception handling to manage more complex program flows. Other features include using for in to iterate through collections, allowing you to deliver and use arbitrary length arrays with a function, without having to determine lengths before running operations.



