Merge `Process` global library with `os`
Closed this issue · 2 comments
The library Process
should be merged with the os
library.
Grouping the process library's content inside the os
library would be a good idea for a variety of reasons.
Grouping them as seperate libraries does not make much sense as the purpose of each library is the same, yet they are in different global std libs.
It would make it Lune more familliar to vanilla Lua, lessening confusion to people coming from regular Lua. Also some other languages use the os
name as well.
Also os
is a much more ergonomic name than Process
. os
is much easier to type and remember than Process
.
Right now we have things such as process.cwd
which is the current working directory for the lune process, process.args
which are the arguments passed to the lune process, and so on. The os
global which exists in vanilla Lua is also very different from the Luau one and Lune chooses to also put its builtin libraries in the require("@lune/...")
scope. Modifying the os
global is probably not a good idea for these reasons, and I also think the name distinction between process
and os
is important here. Using the same library name as vanilla Lua only leads to confusion when it contains completely different and incompatible APIs.
Right now we have things such as process.cwd which is the current working directory for the lune process, process.args which are the arguments passed to the lune process, and so on. The os global which exists in vanilla Lua is also very different from the Luau one and Lune chooses to also put its builtin libraries in the require("@lune/...") scope. Modifying the os global is probably not a good idea for these reasons, and I also think the name distinction between process and os is important here. Using the same library name as vanilla Lua only leads to confusion when it contains completely different and incompatible APIs.
Ok that's understandable.