Fantom language documentation
pod::type.slot program structure
syntax for literal types
Overview, Bool, Int, Float, Decimal, Str, Duration, Uri, Type, Slot, Range, List, Map
syntax for expressions
Operator Precedence, Shortcut Operators, Same Operators, Conditional Operators, Ternary Operator, Null Convenience Operators, Type Checking, Indexing, Bitwise Operators, Serialization Expressions, Advanced Operators
syntax for statements
Overview, Expression Statements, Return Statement, Local Variables, If Statements, Loop Statement, Switch Statement, Exception Handling
exception handling
Overview, Err Class, Throw Statement, Try-Catch Statement, Finally Blocks
static type system with bit of dynamic thrown in
Overview, Types, Pure Object Oriented, Nullable Types, Value-Types, Statically Typed, Implicit Casts, Type Signatures, Collections, Generics, Subtype Substitution
organization of source code
Organization, Char Encoding, Anatomy of Source File, Using, Comments
creating pods
creating class types
creating mixin types
creating enum types
Overview, Range, Enum Constructors, Enum Modifiers, Reflection
slot model
deep dive into method slots
Overview, This, Constructors, Static Initializers, Default Parameters, Operators, Virtual Methods, Abstract Methods, Once Methods, Covariance, This Returns, Dynamic Invoke, Native Methods
deep dive into field slots
Overview, Simple Fields, Accessor Methods, Calculated Fields, Const Fields, Static Fields, Protection Scope, Readonly Fields, Virtual Fields, Abstract Fields, Definite Assignment, Overriding a Method, Mixins, Native Fields
rules for slot inheritance
Overview, Syntax, Inheritance Rules, Inheritance Restrictions, Overrides, Covariance, Super
annotating types and slots with metadata
Overview, Facet Classes, Annotations, Reflection, Inheritance
functional programming
Overview, Function Signatures, Calling Functions, Type Compatibility, Methods, Immutable Functions
deep dive into closures
Overview, Syntax, Binding Locals, Closure Parameters, Iteration, Closure Type Inference, It-Blocks, This Functions, With-Blocks
Java foreign function interface
Overview, Interop Summary, How it Works, Class Path - Compiler, Class Path - Runtime, Primitives, Reflection, Arrays, Nullable, Overloaded Methods, Constructors, Subclassing, Overrides, Inner Classes, Dynamic Calls, Functions as Interfaces, Annotations
implementing methods and fields in Java and C# code
Overview, Native Classes, Native Peers, Native Methods, Native Fields
compiling to JavaScript
Overview, Js Facet, Deployment, Browser Runtime, Alternative Runtimes, Invoking Fantom from JavaScript, Natives, Testing
how to deploy pods and applications
customizing the Fantom environment
Overview, Directory Structure, BootEnv, Setting Env, PathEnv, JarDistEnv, Indexed Props
reading/writing objects
Overview, Data Model, Serializable, Simple, Collection, Streams, Syntax
model for sharing data between threads
message passing concurrency
Overview, Actors, Actor Locals, Message Passing, Futures, Message Error Handling, Timers, Chaining, Coalescing Messages, Flow Control, Actor Pools
URI naming system
logging APIs
Log Creation, Log Statements, Log Levels, Log Handlers, Log Setup
localization APIs
domain specific language and compiler plugins
date and time APIs
Overview, Ticks, DateTime, Localization and Formatting, TimeZone, Trade-offs
additional detailed notes
coding conventions we use
Overview, Source Files, Naming, Common Names, Indention, Statements, Comments
formal BNF syntax grammar
Legend, Compilation Unit, Type Def, Slot Def, Facets, Stmt, Expr, Type, Misc, Keywords, Position Keyword