Classes for luau module

Also, I apologize, I am not a super high frequency on the development forums and I did not recognize your status here. And my tism goes off when people say things that don’t match documentation to persuade someone to do something that perhaps don’t need to do.

So my apologize on the doc hard siting you there. My bad.

1 Like

Just locally or using a lot of exporting? And have you figured out a more reliable format of returning from a module in a way that infers the typing so that I don’t have to hard reReference every time.

CraneStyle is my dicord, hit me up, would love to compare. I have done a little type script work as I edge into it, but some of my experiments have been quite frustrating.

The one you linked is even more recent than mine is! I’ve forgotten just how long ago I’ve made my module. I do quite like how it includes public and private fields, but I don’t like how they’ve been implemented. It feels very clunkly to define those fields and I wish they were written better. This does give me some ideas for if I ever revive my class system… Maybe some day?

This implementation made by @ChatGGPT use fenv to create non-local variables which should be avoided in practice and reconsidering what I mentioned earlier about how types could be added, any benefit they could provide wouldn’t work here as fenv breaks type-safety.

Maybe I am dumb but I still don’t get what you guys mean by type annotation for classes

How would this look like???

Any environment modification disables optimizations. So yeah that’s true.

How so? You should make a feature request or an issue on the guy’s GitHub page if you have any feedback for it.

class.rbxm (1.7 KB)

Ok guys new small update now it lets you do

class {
    ...
}