Lazarus

Free Pascal => General => Topic started by: Alextp on July 12, 2019, 01:22:07 pm

Title: Any plans for anonymous functions feature?
Post by: Alextp on July 12, 2019, 01:22:07 pm
Mate of mine told me that FPC (trunk) has not complete anon-functions support. Like Delphi 10 does. Anon-funcs are not 100% implemented. Only on Mac they are. When it will be implemented?
Title: Re: Any plans for anonymous functions feature?
Post by: skalogryz on July 12, 2019, 02:57:06 pm
Anon-funcs are not 100% implemented. Only on Mac they are.
On Mac, they're not an arbitrary anonymous functions. They're blocks (https://en.wikipedia.org/wiki/Blocks_(C_language_extension)). Which is a special Apple feature for C-languages family and is following its own implementation requirements.
Title: Re: Any plans for anonymous functions feature?
Post by: Thaddy on July 12, 2019, 03:51:55 pm
I think there is a branch for anonymous functions, but its progress is slow.
IOW it is being worked on.
Title: Re: Any plans for anonymous functions feature?
Post by: marcov on July 12, 2019, 03:53:14 pm
And therefore it will not be in the next FPC 3.2.x series.

So before it hits production will be multiple years.
Title: Re: Any plans for anonymous functions feature?
Post by: SlightlyOutOfPhase on July 12, 2019, 04:58:00 pm
I don't think progress is "slow" at all.

AFAIK the feature is literally done and Scooter Software has been using it in production for quite a while. It is just seemingly impossible to get people to communicate properly in order to have it merged into the main FPC codebase once and for all.

Come to think of it though, isn't it against the license of FPC for Scooter Software to use a modified FPC in production code without making the source available?

Even if that current branch of FPC (not the one from 2012) for anonymous methods was generally available, it'd be much preferable to the current situation, as plenty of people are perfectly happy to use experimental / trunk / e.t.c builds of the compiler.
Title: Re: Any plans for anonymous functions feature?
Post by: skalogryz on July 12, 2019, 05:12:18 pm
Come to think of it though, isn't it against the license of FPC for Scooter Software to use a modified FPC in production code without making the source available?
No. They don't distribute FPC itself. They only distribute its product.
GPL requires the sources availability only if the GPL-ed software is distributed.

(Note, that currently its taking its own toll on their development. As they've to (manually) keep up with FPC updates. It would be so much easier, if FPC was using git. So much easier to use and NOT to share. Must switch to git, asap!)
Title: Re: Any plans for anonymous functions feature?
Post by: SlightlyOutOfPhase on July 12, 2019, 05:14:59 pm
No. They don't distribute FPC itself. They only distribute its product.
GPL requires the sources availability only if the GPL-ed software is distributed.

Ah, that's right. Still not sure why they don't, though...
Title: Re: Any plans for anonymous functions feature?
Post by: skalogryz on July 12, 2019, 05:16:01 pm
Ah, that's right. Still not sure why they don't, though...
Why should they bother? Simply placing a download link on a site, is already an expensive thing.
One has to pay a webmaster money to update the site... and then maintain it.
Title: Re: Any plans for anonymous functions feature?
Post by: SlightlyOutOfPhase on July 12, 2019, 05:27:28 pm
(Note, that currently its taking its own toll on their development. As they've to (manually) keep up with FPC updates. It would be so much easier, if FPC was using git. So much easier to use and NOT to share. Must switch to git, asap!)

There's an existing Github mirror of FPC that's automatically updated constantly, at least.

Why should they bother? Simply placing a download link on a site, is already an expensive thing.
One has to pay a webmaster money to update the site... and then maintain it.

It's more a question of "why doesn't Blaise Thorne, who they paid to develop it, just have a normal repository of it literally anywhere of his choosing."

(Bitbucket, Github, Gitlab, e.t.c., wherever, doesn't matter at all. Plenty of free options out there.)
Title: Re: Any plans for anonymous functions feature?
Post by: skalogryz on July 12, 2019, 05:36:38 pm
There's an existing Github mirror of FPC that's automatically updated constantly, at least.
Oh, great! I hope they're using it! makes the work of these great people much easier.
Title: Re: Any plans for anonymous functions feature?
Post by: k1ng on July 12, 2019, 06:00:50 pm
Maybe check/help and ask in the mailing list here (https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg37848.html) and here (https://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg37573.html).  ;D
There is also a bug report (https://bugs.freepascal.org/view.php?id=24481) with some stuff.
Title: Re: Any plans for anonymous functions feature?
Post by: jamie on July 13, 2019, 12:44:13 am
Look John, I am still waiting for my Anonymous record enclosures..!!1

Its a long line my friend!

73's
Title: Re: Any plans for anonymous functions feature?
Post by: jamie on July 17, 2019, 11:37:28 pm
Hope your legs aren't getting tired from waiting! :D