Read before Proceeding
Last updated
Last updated
Credits: The Gauntlet programming language and this accompanying documentation were written solely by TricolorHen061
.
Gauntlet is in it's alpha phase. Please expect (and !) bugs.
Non-parser error messages are do not contain line numbers. This will be implemented in a future update.
There is little typechecking. Better typechecking will be implemented in the future.
All Gauntlet type names are the CamelCase version of it's corresponding Go type name. For instance:
String
type in Gauntlet -> string
type in Golang
Float64
type in Gauntlet -> float64
type in Golang
Int
type in Guantlet -> int
type in Golang
The only two exceptions to the above rule are:
Unit
, which is equivalent to ()
Null
, which is equivalent to nil
You can import and use any library from the Golang ecosystem without writing a binding. Though at this point in time, Gauntlet does not perform type-checking on them.
When referring to a function from a module, use camelCase to refer to it. Use PascalCase for everything else.
Anything wrapped in <>
signifies a required placeholder
Anything wrapped in []
signifies an optional placeholder
The type of casing that should be used is reflected in placeholder names. For instance, if something LooksLikeThis
, it means PascalCase should be used.
Generics
Syntax: [TypeConstraint ParamName, ...]
Example: [String T, Any U]
GenericsInstantiation
Syntax: [Type1, Type2, ...]
Example: [String, Int]
Parameters
Syntax: ParamType ParamName, ...
Example: Int num1, Int num2
varPattern
Syntax: varName1, varName2, etc
Example: firstName, lastName
Join the Discord server
Take a look at the GitHub repository
Check out the Visual Studio Code extension