Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Classes

Lucius Lamparter edited this page Mar 9, 2023 · 1 revision

๐Ÿ—ƒ๏ธ 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 . 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.)