Results 127 comments of lenscas

With Teal being nominal typed rather than structurally typed, I don't think the code for `is_myrecord` is technically correct. However, I do get the idea behind this and I really...

https://teal-playground.netlify.app/?c=bG9jYWwgZnVuY3Rpb24gZG9fb3JfZmFpbDxUPihmdW5jOiBmdW5jdGlvbjxUPiguLi46IGFueSk6IChUIHwgbmlsLCBzdHJpbmcpLCAuLi46IGFueSk6IFQKICAgbG9jYWwgcmVzLCBlcnIgPSBmdW5jKC4uLikKCiAgIGlmIG5vdCByZXMgdGhlbgogICAgICBwcmludCgiZG9fb3JfZmFpbCBmYWlsZWQhIiwgZXJyKQogICAgICBlcnJvcihlcnIpCiAgIGVuZAoKICAgcmV0dXJuIHJlcwplbmQ%3D Seems to also fix it. The problem is caused because teal doesn't know how many return parameters you want and thus assumes that every `,` is followed by a...

what would it do if the target isn't lua5.4?

one of the goals of teal is to stay close to lua. Considering that lua doesn't have traits I don't think that adding them to teal is good. Teal needs...

I am perfectly fine changing it to s runtime check, however because it touches something as important as textures I figured that having to opt in at compile time would...

hmm... What about an API like ```rs pub struct PrivateConstruct(()); pub enum TextureFormat { RGB8, RGBA8, RGBA16(PrivateConstruct), Depth, Alpha, } impl TextureFormat { fn rgba16(...) -> Result {...} unsafe fn...

> I don't think this very API is implementable (I am not sure what to put in place of those ...) Unless I am missing something, presumably it is a...

valid points (except that WASM is not no-std). Making the error also more obvious by printing something to the console before it would crash is also not an option (At...

That may make the problem worse. Because that would mean an entire crate becomes unusable even if only a very small/niche feature of said crate uses this library. So, maybe...

with the "I know what I am doing" flag I meant a flag that would stop the error at compile time and thus let it crash on run time if...