lua-users home
lua-l archive

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


But if you write you own extension for "special applications" - can
you not do this with meta-variables much nicer? (see e. g. Bit-Array
example in Programming in Lua of Roberto?). With Meta-Functions you
have quite many possibilities to add special apperators to such a new
user type? ... and for this you do NOT need to modify any basic Lua
code... .

On Tue, Jan 18, 2022 at 7:57 PM Patrick Kurth <p.kurth@posteo.de> wrote:
>
> On Tue, 2022-01-18 at 14:53 +0100, Flyer31 Test wrote:
> > Are you really sure that this is good idea?
> >
> Yes and no ;)
>
> > I am quite new to Lua, but I think at least for beginners, it is nice
> > and reasonable that Lua skips all these "typical C abbreviations" ++,
> > --, +=, -=, *=, ...  . Too many operators I think are not helpful,
> > especially not for a skript language which should be "learnt easily".
> >
> > But I still did not see from your proposal, why you would use /- or
> > /+
> > instead of -= or += ... doesn't this writing /- or /+ really look a
> > bit VERY strange?
> >
> Please read my question again, this is not about += and -=. It is not
> intended for "regular" lua. There are a lot of projects (such as mine)
> which embed their own lua interpreter and for some applications (such
> as mine) a specialized version can make sense. For this, "easily
> learnt" is not of importance.
>
> > ... but changing all such Lua source files I think would be very
> > challenging ... if you would try this you should be a complete Lua
> > source code expert I think. (Also please consider, that if you modify
> > so many files by yourself, you very easily will run into problems
> > with
> > every new Lua version update..).
>
> Well, I don't think it's too hard, I already started doing that, I was
> just asking for pitfalls. And I'm not an expert in the lua source code,
> hence the question ;)
>
> Kind regards,
> Patrick