lua-users home
lua-l archive

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


On Friday, 21 January 2011, Terry Bayne <trbayne@gmail.com> wrote:
> On Thu, Jan 20, 2011 at 20:19, Tang Daogang <daogangtang@gmail.com> wrote:
>> Hi,
>>
>> anybody has done the work: support '//' ( or '#' )  as lua's one line
>> comment identifier? Like it's original '--' .
>>
>> I have looked for http://lua-users.org/wiki/LuaPowerPatches , find no patch
>> about it.
>>
>> And I have added '!=' to lua source code, to stay the same as javascript,
>> python, c, c++, java, php, and many others.
>>
>> Thx.
>>
>
> Repeat after me....
>
>     "Lua is NOT C/C++/C#/Java/{Insert Language of Choice here}"
>
> I used to go to the trouble of patching the source to allow "!=" and a
> few others.  What a waste of time that was (for me).  Every new
> version would require patching.  My code was not portable.  If I
> wanted to post a code snippet to the list or the web I would have to
> remove my personal syntactic idiosyncrasies to make my code readable
> by others (or go through the trouble of explaining my dialect).  I
> finally figured out that it didn't really buy me anything and simply
> incurred an additional time burden (which always seems to be in short
> supply).
>
> Your mileage may vary - but for me - it was NOT worth the trouble.
>
> Terry
>
>
>
>
> --
> If you lose your name you become small,
> If you lose your spirit you become nothing


I would have to agree with the other comments about adjusting the
syntax to be more C++ like. If you really want to use C++ syntax in a
scripting language then it would be better to use one which supports
it by default[1].

Liam

[1] http://www.angelcode.com/angelscript/