Class creator based on Python

Hi, I’ve been working on this class creator based on Python for a few weeks and maybe planning to release it when the module is finalized, How’d you guys think of it?

local messageClass = class(nil, {
	__index = "self",
	__init = function(self, message: string)
		self.message = message
	end,
	
	[def "printMessage"] = function(self)
		print(self.message)
	end,
	[def "setMessage"] = function(self, message: string)
		self.message = message
	end,
})

local message = messageClass("Hello World!") -- or messageClass.new()

message.printMessage()
message.setMessage("Hello world again!")
message.printMessage()

image

I’d like to hear criticism, as long as it is constructive! :smiley:

2 Likes

what is its uses?

None, I made this for fun, I didn’t say it’s useful or necessary but when it is publicly released, I won’t stop you from using or force you to use it and won’t point out how “necessary” it is, you just use it at your own will

I think that is pretty creative, making something based on python
But since it has no use, people may not waste time to use it

Thanks for reading

1 Like

It’s not intended for working purposes, I just wanna showcase something I’ve done that I think it was cool and wanted to see other’s opinions on it

1 Like