[fpc-devel] Suggestion: reference counted objects

silvioprog silvioprog at gmail.com
Tue Sep 23 19:51:39 CEST 2014


On Tue, Sep 23, 2014 at 1:53 PM, Boian Mitov <mitov at mitov.com> wrote:

>   It used to be compatible, however since we rewrote it to use anonymous
> methods, and attributes (And reduced the code to 1/4 of the original size
> in the process) ~2 years ago, the new versions are not any more Lazarus
> compatible :-( .
>

:-(

Currently I'm programming a lot in Java (for Android) and jQuery (for web),
and I miss the dynamic methods in Object Pascal of Free Pascal (Delphi
already has, which are anonymous methods) too.

Nonproductive:

procedure TApp.DoMyButtonClick(Sender: TObject);
begin
  Alert('Button clicked');
end;

...

procedure TApp.Create(Sender: TObject);
begin
  MyButton.OnClick := @DoMyButtonClick;
end;

or:

procedure TApp.Create(Sender: TObject);
begin
  MyButton.AddOnClickHandler(@DoMyButtonClick);
end;

Productive:

procedure TApp.Create(Sender: TObject);
begin
  MyButton.SetOnClick(procedure Test; begin
      Alert('Button clicked');
  end);
end;

I have a lot of ideas to be implemented in two projects (Brook, dOpf) that
I maintain. But unfortunately it will take a while to release the new
version of the compiler (FPC 2.8), and this prevents me from continue
working to release new versions of this projects.

I'm thinking to make the new version of this projects compatible with
Delphi XE (the company that I work purchased the Delphi XE 2), so I can
increase my productivity using new features like the new RTTI, generics and
anonymous methods. But for now it will take, because I'm focused on the
Java studies.

I have reflected that in the Wikipedia OpenWire page.
> I hope one day OpenWire will again be Lazarus/FPC compatible.
>

Me too! (y)

I have a RESTful API written with Free Pascal 2.6.4 working like a charm
and providing data to my clients via JSON in secure HTTPS connections, but
the maintainability of this API could be improved, if the compiler decides
to follow the evolution of OO languages.

I have no knowledge to help to create this improvements in the compiler,
but I believe that the greatest difficulty here will be to convince the
guys to break paradigms and accept that the linguangens are evolving. Our
customers are increasingly demanding, so our productivity must accompany
their needs, or they look for our competitors companies!

With best regards,
> Boian Mitov
>

-- 
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140923/5e704cf6/attachment.html>


More information about the fpc-devel mailing list