SRON go through updates and fixes everytime, someone reports some bugs and vulnerabilities.
If you detect that the arguments passed to a function is incorrect, then you can display 'ArgumentException' (denotes that the passed arguments are of wrong type) into the terminal.
OBUFFER keyword can be used to put values in a buffer which can be later displayed on terminal/console at once. It can be used to achieve greater optimization levels. Know more from here.
To get the information and perform operations on internal components, sron_cmd() function can be used. Know more here.
SRON version 2.2's compiler detects syntax errors and displays accurate & easy error messages for great developer experience.
To achieve faster user defined function calls, the bytecode is now cached and once a function is loaded, it will not be loaded again.
SRON's compiler removes dead code and unimportant tokens to generate highly optimized bytecode. Also, it indexes variables, inbuilt function etc. to reduce memory and power usage during runtime and increases speed to next level.
The speed and memory usage of Garbage Collector is taken to another level with deep optimization and better efficiency. SRON's Garbage Collector manages memory automatically and avoid memory leaks, making SRON - a safe and stable language.
For faster, efficient and optimized compiler and interpreter, the whole SRON's codebase is shifted to Clang with C++23. All previous versions( < v2.2) were developed using GCC with C++11.
'console' attribute is highly optimized for tight loops with insane speed specially when used with 'OBUFFER'.
Now, the in-built function calls are faster and user-defined function are also optimized with a whole new BytecodeReader.
Now, accessing variables is faster and efficient along with compile+run time checks.
In version 2.1 and before, after the successful or unsuccessful execution, the exit code was always 0. Now, certain exit codes will be returned for error/exception detection. Read from here
SRON version 2.2 ensures that if the bytecode file is renamed then the interpreter will detect it and throw the exception.
"Variable not found" error is fixed for variables in 'rotate' attribute.
In version 2.1, if an element of a list is stored in a variable and then the list is cleared using 'clear()' function and then if you try to access that variable, the interpreter gets halted by Segmentation Fault. This Bug is fixed by optimization & correction of Memory model & Garbage Collector.
In version 2.1, if a function is being declared within sub-scope and then it is used outside that scope, the runtime error is triggered instead of compile time error. This problem is fixed now.
SRON interpreter's is optimized greatly with 48% enhancement in speed and Power usage decreased by 25%.
The bytecode is being cached by the interpreter so SRON now doesn't support mutating code.
SRON v2.1 is now completely open sourced. Check it out from here.
Speed of 'print()' and 'println()' is improved even long print statements even in tight loops.
As everything related to memory is managed by Garbage Collector so the 'free' attribute is removed which opened new gates for better optimizations.
After complete execution of the code, the interpreter use to print the total time taken to execute the code. That is removed and now to get the execution time, you should call 'get_exec_code()' function which returns the time taken in value of type 'Double'.
Before version 2.2, the bytecode generated by the compiler can be modified by renaming the bytecode file and its modification cannot be detected but now SRON's interpreter will verify the integrity of the bytecode before executing its code.
Function calls and their declaration is now strictly case sensitive. If not followed, you will face both compile and runtime errors.