-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider LUA sigil turning script into chunk #35
Comments
@Papipo i was planning on supporting this via a sigil modifier, e.g. ~LUA"foo()"c What do you think? |
Mmm, the only problem I see is that if there are functions that can receive both a string and a chunk you might forget to add the modifier and just carry strings instead of chunks. |
Well, the reason why I didn't do this to start is that the sigil would need to return a tuple of the chunk and the Lua state, similar to Luerl.do Given that the shape of the return value is much different, I'm not sure it's so much of a concern |
Ah, true. I was thinking about There is also the option of making chunk the default and string the modifier. But that only makes sense if you can get the chunk without state (via the function stated above). |
I think that given that chunks are portable and don't need a state, it might be interesting to use luerl to turn ~LUA usages into Lua chunks. After all, it's inevitable that they will be loaded at some point, so why not have them converted to chunks already?
The text was updated successfully, but these errors were encountered: