lua-users home
lua-l archive

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


On 14 Jan 2014, at 13:48, Choonster TheMage wrote:

>> So, by maintaining the two operators separate, which is fine, could I
>> redefine .. to something like 'concat'?
>> That way I would end up having "Hello" concat "World"
>> 
>> 
> 
> Not unless you use a modified version of Lua or a source-to-source
> converter. Lua lets you overload the functionality of existing
> operators, but you can't create your own aliases for them.
> 

If you're already looking at words instead of symbols however, there's nothing stopping you just writing a small function for it.

function cc(x, y)
    return x .. y
end

--
:wq!

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail