Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Classes

Lucius Andrexius edited this page Jan 24, 2023 · 4 revisions

πŸ—ƒοΈ Foundation


Classes are a way of making Flux a tidy programming language and is one of the ways it differs from Python and makes it object-oriented.

Foundation is Flux's class library.

πŸ—οΈ Architecture

Classes are built in an orderly way. Here is a diagram that explains it:

Organisation . Package name . Module . Submodule . Etcetera
Riverside.Depth . Esmerelda . Core . Calculation . Difference(a, b)
System . Console . WriteLine("cats are better than dogs") . N/A . N/A

Obviously, classes don't necessarily need to be executable functions, they can also be variables. E.g.: System.Console.Enabled will return a boolean value.

πŸ“ System.Console.Enabled is partially immutable, meaning while it can be changed, changing the variable will not change the state of the logger; in this case, use System.Console.Enable() or System.Console.Disable() appropriately. (this will of course change the variable System.Console.Enabled.)