Mamba

Logo

Documentation of the Mamba Language

View the Project on GitHub JSAbrahams/mamba_doc

🏠 Home

2 🛠 Features

2.3 📦 Modules

📄 Contents

2.3.1 Script

2.3.2 Types

2.3.3 Stateful and Stateless

Introduction

A module is one of the following:

Module type Description
script A sequence of Instructions.
type A blueprint for a class, defines the behaviour of a class.
statlful A blueprint for an instance of an stateful object. Defines the behaviour of that object, and may implement a type.
stateless A blueprint for a singelton, stateless object. Only one instance of such an object can exist, and its state may never change. It can implement a type.

A file may contain either a script accompanied by functions, or a mix of type, stateful and stateless modules. It is generally best to have at most one type per file for readability sake.