📄️ Hello World
Duck is a compiled, statically type-checked language based on an expressive type system and the go runtime.
📄️ Strings
📄️ Primitives
Primitives are the following types:
📄️ Variables
📄️ Expressions
In duck, almost anything is an expression
📄️ Control Flow
If
📄️ Structs
Structs are nominally typed (meaning they must be exactly the same definition to be considered compatbile) data types
📄️ Duck Typing
Ducks are types that need a minimum of fields
📄️ Union types
Union types are types that
📄️ JSON
JSON is supported out of the box.
📄️ Async
Use the async keyword with a function call to execute the function call in parallel.
📄️ Defer
Use the defer keyword with a function call to execute the function call after
📄️ Web Components
Duck has support for both Server Side Rendering using duckx and Client Components with jsx and preact
📄️ Go Interop
You can use go {} blocks everywhere as an expression
📄️ Auto Traits
Auto traits are compiler generated implementations for commonly needed behaviour such as converting to string,
📄️ Creating a HTTP Server
In duck you can easily create a HttpServer using the std::http module.