Releases: Robotnik08/cdosato
Dosato v0.5.1
Dosato Version 0.5.1
New Features
- Classes have been added to the language. Classes are a way to group data and functions together. Here is an example of a class in Dosato:
class Person (name, age) {
set self->name = name
set self->age = age
implement greet () {
do sayln(`Hello, my name is {self->name}. I am {self->age} years old`)
}
}
More information on classes can be found in the documentation.
Fixed Bugs
- Template strings did not support escape sequences. This has been fixed.
- Using return without value outside of a function would cause a segmentation fault. This has been fixed.
Dosato v0.5
Dosato Version 0.5
This major version of dosato is not compatible with code written in previous versions. The following changes have been made:
- The
=>
operator in a for loop has been replaced with theas
keyword.
New Features
- Closure support has been added to the language. Closures can be created by using the
=>
keyword in combination with arguments, a type, and a body.
make add = int (a, b) => {
return a + b
}
More information on closures can be found in the documentation.
- The
as
keyword has been added to the language. Theas
keyword is used in for loops to iterate over a range of numbers.
make i = 0
do sayln(i) for range(0, 10) as i
- Console mode has been added to the language. This mode allows for the user to input data into the program.
dosato -c
This will open the dosato interpreter in console mode. You can type dosato code directly into the console and run it by pressing enter.
Press \
and then enter to put a new line in the console.
- Negative array indices are now supported. You can now access elements in an array using negative indices.
make arr = [1, 2, 3, 4, 5]
do sayln(arr#-1) // prints 5
Fixed Bugs
- Unary operators has too high precedence. This has been fixed.
- The Carrage return character is now considered a whitespace character.
Dosato v0.4.8
Hotfix with constants
Dosato v0.4.7
New Number literals:
Hex: 0xff
Binary: 0b10101
Octal: 0o76 or 076
Dosato v0.4.6
Added optional typing for function arguments and return types
Dosato v0.4.5
0.4.5 new features
-
Null coalescing operator (??, ??=)
-
Safe object access (?->)
-
Pipeline operator (|>)
-
Range operators (:>, :<, :>=, :<=)
-
to_string function (same as a string typecast)
Installer is for windows, unix is supported, you just have to compile it yourself
Windows v0.4.4
catch function added
Windows v0.4.3
Added tuple like assigning
For unix, compile it yourself, it is supported
Windows v0.4.2
First Dosato release for windows.