lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>> What do you mean by "putting OOP in the core"?
>> 
>> Having native support to OOP in Lua:
>> 
>> class A
>> 	function A(name)
>> 		self.name = name
>> 	end
>> end
>> 
>> class B extends A
>> 	function B(name)
>> 		super(name)
>> 	end
>> 
>> 	function toString()
>> 		return name
>> 	end
>> end
>> 
>> b = new B('me')
>> print(b.toString())
> 
> why put it in the core ? that's what the library mechanism is all
> about! 
> 

I'm probably having some problem to express myself in the list, probably
related to the language (I'm brazilian). I apologize for that.

What I'm trying to say is: I can write cryptic code, I can write
programs in assembly, I could even teach myself Perl ;), but users of my
app can't, so anything that doesn't appear as normal code does not fit
my needs, *because* of the users. Being Lua an easy to use language that
can help extend other applications I think OOP syntax should be
considered as an issue.

Andre