📄️ Variables
In Crabby, a variable is declared with the let and var keyword.
📄️ Constants
Constants in Crabby are immutable, meaning that once a constant is assigned a value, it cannot be changed. This is a fundamental aspect of the language that helps prevent accidental modification of data.
📄️ Arrays
In Crabby, arrays are a collection of values of the same type. They are created using square brackets [] and can contain any number of elements of the same type.
📄️ Functions
Functions in Crabby can be used with the def or fun keyword!
📄️ Pub
In Crabby, the pub keyword is used to declare a function as public, which means it can be imported and used by other modules. Here's an example of a public function in Crabby:
📄️ Private
The private keyword is used to declare a private function, which means it can only be accessed within the same module or file. Private functions are useful for encapsulating functionality and preventing unauthorized access to sensitive data or operations.
📄️ Docstring
You can make a docstring in Crabby by doing this:
📄️ If Else
In Crabby, using if & else statements are a way to make decisions in your code. It's a simple and straightforward way to control the flow of your program based on certain conditions.
📄️ Loops
In Crabby, you can do loops by using the loop & for-in keywords.
📄️ Classes
In Crabby, a class is a blueprint for creating objects. A class defines the properties and methods that an object of that class will have.
📄️ Structs
In Crabby, The struct keyword is a custom data type that allows you to group together related data under a single name.
📄️ Enums
In Crabby, the enum keyword is short for enumerations, it's a custom data type that can be one of several different variants.
📄️ Match Case
In Crabby, pattern matching is usually done with the match && case keyword!
📄️ Lambda
In Crabby, the lambdas keyword is for Math equating and basic maths, Lambda creates small anonymous functions, just like in Python!
📄️ Decorators
Just like in Python, a decorator in Crabby is a powerful and flexible way
📄️ Macros
In Crabby, the macro is used for defining macros, it is a code, that writes code which is a form of Metaprogramming just like the decorators.