Menu
The Goat AdamaThe Goat AdamaAdama Language DocumentationDocumentsUpdates
GitHub
🌜
🌞
The Goat AdamaThe Goat AdamaAdama Language Documentation
  • Documents
  • Updates
  • GitHub
  • Language Tour
    • A Language Tour
  • Why
    • Origin Story
    • Lazyness as a Virtue
    • Affordability (i.e. Cheap)
    • A Commitment Towards Stable
    • Building Should Be Fun
    • AI Wars and Get Testing for Free
  • What
    • Living Document & Tiny Servers
    • Actors are for Acting!
    • Dungeon Master as a Service
    • Mixed Compute and Storage Engine
    • Privacy as a First Class Concept
    • Single File Infrastructure
  • How (the Tutorial)
    • Build and play with demo
    • Hello Adama
  • Language Guide & Reference
    • Document Variables & Types
    • Comments
    • Defining Record & Message Types
    • The Constructor (@construct)
    • Constants
    • Local Variables & Assignment
    • Built-in Math Expressions
    • Anonymous Messages & Arrays
    • Maybe Types
    • Tables & Language Integrated Query
    • Control Statements
    • Defining Functions & Procedures
    • Methods on Records
    • Handling Connection Events
    • Enumerations & Dynamic Dispatch
    • Channels, Channel Handling, and Futures
    • The State Machine
    • Reactive Formulas
    • Privacy & Bubbles
    • Handling Connection Events
    • Testing
    • Anonymous Messages & Arrays
    • Error Compendium
  • Platform API
    • Platform API Introduction
  • Who
    • Jeffrey M. Barber

Methods on Records

Records can have methods that allow code to run within the context of a record.

record Point {
public double x;
public double y;
method lensqr() -> double {
return x * x + y * y;
}
}
Previous
« Defining Functions & Procedures
Next
Handling Connection Events »

The Documents

  • Why
  • What
  • How

Links

  • Blog
  • RSS
  • Atom
  • GitHub
Copyright ©2021 Jeffrey M. Barber.

This disclaimer informs readers (such as yourself) that the views, thoughts, and opinions expressed in the text and images belong solely to the author, and not necessarily to the author's employer, organization, committee or other group or individual. I say crazy shit all on my own.