NOTEdevelopment
with new features and bugs being fixed, if you encounter an error then that's OUR fault (boohoo)
and we're still fixing it. Crabby is very new due to the rewrite update
and is still is experiencing bugs and errors. You can help fixing Crabby if you want to.
Crabby is a Modern High-level, Versatile, Multi-paradigm, general-purpose, and a hybrid approach programming language. It is designed to be readable, ease-to-use for beginners, and powerful enough for advanced users.
Crabby is leaning into multi-paradigm, supporting paradigms like OOP and Procedural style of programming. But if you want the functional nature of Crabby, It is still a Functional programming language by default.
It syntactically resembles Python, But it's a Functional programming language by default.
As you may notice, Crabby has been through phases of rewrite, and if you're thinking that Crabby is abounded, well... You're Wrong!
Crabby has been officially and well be written in Rust due to it's memory safety and type checking compared to C.
Here's what changed:
- It has Pythonic-style of Syntax BUT with a functional approach
- It's purely functional (not yet for now)
- JIT compile time
- Runtime & Type checking on the work.
- Error handling on the work
- More parsing and features!
Note
: We highly recommend to use the nightly toolchain edition of rust
Step 1: Make sure to have git
and rust/cargo
installed
git --version
cargo --version
Step 2: Git clone
git clone https://github.com/Kazooki123/crabby.git
Step 3: Build it and Test it for yourself
cargo build
cargo run examples/example.crab
In Crabby🦀, its' syntax mostly resembles Python in general BUT there are hints
of Functional Programming syntax since Crabby aims to be versatile, functional and powerful to use not just for advanced programmers but for beginners also!
It's default file format is a .crab
or .cb
But for now it's .crab
example.crab:
let x = 42
let y = 314
var z = 10 // You can use the 'var' keyword too!
let message = "Hello, Crabby!"
print(x)
print(y)
print(z)
print(message)
functions.crab:
pub def foo() {
print("Hello!")
}
foo()
helloworld.crab:
print("Hello, World!")
math.crab:
// addition
let x1 = 1
let y1 = 2
// multiplication
let x2 = 4
let y2 = 7
// subtraction
let x3 = 10
let y3 = 3
// division
let x4 = 10
let y4 = 3
print(x1 + y1)
print(x2 * y2)
print(x3 - y3)
print(x4 / y4)
ifelse.crab:
// if-else statements
let x = true
let y = false
if x {
print("True!")
} else {
print("Nope!")
}
loops.crab:
let x = range(10)
for i in x {
print(i) // Prints it 10 times
}
let y = 10
for i in range(y) {
print(i)
}
Note: Crabby supports commenting, use //
to comment out a code or leave a silly ahh message :3
Speaking of comments, Crabby also support Docstrings
!
The closest package manager Crabby
can have is crab🦀 (which is still in development),
it functions likely the same as Rust cargo
but for Crabby
Crabby is open to contributions! Feel free to open an issue or a pull request. Make sure to read the Contributing Guidelines before getting started.
Crabby is licensed under the GNU General Public License v3.0.
Thanks goes to these wonderful people that used to help this project! 👨💻💻:
Mr.Coder 💻 |
Saturo 💻 |
Trnx 💻 |