Difference between revisions of "User:SuzannaLinn Resident/LuaFuture"
Line 14: | Line 14: | ||
- 1) Scripts will compile and run in LSL code as always, and at the same time will be compiled and tested in Luau code. | - 1) Scripts will compile and run in LSL code as always, and at the same time will be compiled and tested in Luau code. | ||
- 2) Scripts will compile and run in Luau code. | - 2) Scripts will compile and run in Luau code.This change will be announced, allowing us to test our scripts on the beta grid. | ||
- 3) We will have Luau and LSL to choose. | - 3) We will have Luau and LSL to choose. | ||
Depending on how many issues appear along the testing, the process will take more or less, so not even the Lindens really now. | Depending on how many issues appear along the testing, the process will take more or less, so not even the Lindens really now. | ||
It’s likely that compiling to Luau bytecode will become available on the main grid before scripting in Luau usercode is available on the beta grid. | |||
Line 94: | Line 96: | ||
Luau is designed to be embbeded easily and the changes required for the SL platform can be added to a new version of Luau with moderate difficulty. | Luau is designed to be embbeded easily and the changes required for the SL platform can be added to a new version of Luau with moderate difficulty. | ||
=== Will LSL scripts compiled in Mono be automatically recompiled to Luau? === | |||
'''No.''' | |||
Existing scripts compiled in Mono will remain as they are. To recompile them to Luau, we will need to manually open and save the scripts again. There are currently no plans to automate this process. | |||
=== Will there be an option to choose between compiling to Luau or to Mono? === | |||
'''Possibly.''' | |||
But only for a limited time. In the long term, Mono will eventually be phased out. |
Latest revision as of 01:41, 8 November 2024
Future
What the future holds for scripting in SL?
Let's look at some questions that we could have in mind about the future...
When will Lua be available?
Nobody knows.
The implementacion of Luau for SL is entering the testing phase. This testing is in three stages, in the beta grid:
- 1) Scripts will compile and run in LSL code as always, and at the same time will be compiled and tested in Luau code.
- 2) Scripts will compile and run in Luau code.This change will be announced, allowing us to test our scripts on the beta grid.
- 3) We will have Luau and LSL to choose.
Depending on how many issues appear along the testing, the process will take more or less, so not even the Lindens really now.
It’s likely that compiling to Luau bytecode will become available on the main grid before scripting in Luau usercode is available on the beta grid.
Will LSL scripts benefit from being compiled to Luau?
Yes.
Lua optimizes the code better than LSL, improving execution time and reducing memory usage, and also uses less memory to store the strings.
The LSL scripts will run faster and we will have more free memory.
Will Lua scripts have more memory?
Not for the moment.
Scripts will stay at 64k, but Lua’s efficiency means we can achieve more within the same memory constraints.
Will LSL continue to exist?
Yes.
For many years, perhaps forever.
Will LSL receive updates with new functions?
Yes... with a very big "but".
New functions will be added to both languages.
It's not doing the work twice. LL functions are written in C++ and they can be linked to both languages
The big "but" is that new functions will be designed with Lua in mind. And Lua has more types of data.
The functions with data types compatible with LSL will be added, the others will not.
Will there be any way to use the functions not added in LSL?
In some cases... but not easily.
A script can be written in only one language. But in the same object we can have scripts in LSL and scripts in Lua.
A LSL script could send data using linked messages to a Lua script that calls the function. Only if the parameters of the function are tables, not functions or objects.
Will there be a translator or transpiler to convert LSL source code into Lua source code?
Likely.
It seems that Lindens have no plans about it, but it could be added to other viewers. And if it is not there, several people, including me, will be working on it.
Will we have to move to Lua?
No.
If you feel that you need more functionalities, you will move to Lua. If you are comfortable in LSL, you can choose to stay in LSL.
Should we stop learning LSL and wait for Lua?
No.
If you are at an intermediate level, you are learning ll functions. They will be exactly the same in Lua. It's a knowledge useful 100%.
If you are a beginner, you are mostly learning programming skills. Also useful 100% for Lua and for any other programming language.
Will LuaSL be updated to the new versions of Luau?
Yes.
Luau is designed to be embbeded easily and the changes required for the SL platform can be added to a new version of Luau with moderate difficulty.
Will LSL scripts compiled in Mono be automatically recompiled to Luau?
No.
Existing scripts compiled in Mono will remain as they are. To recompile them to Luau, we will need to manually open and save the scripts again. There are currently no plans to automate this process.
Will there be an option to choose between compiling to Luau or to Mono?
Possibly.
But only for a limited time. In the long term, Mono will eventually be phased out.