Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/18/25 in all areas

  1. jbg

    JSON benchmarks

    Well, as of today, it uses a binary search and has a much stricter parser.
  2. I would like to share the following in case you encounter the same issue. Class and Record Helpers (Delphi) - RAD Studio states that: Actually, this is not entirely correct. Consider the following: Unit HelperUnit1.pas: TObjectHelper1 = class helper for TObject procedure Test; end; Unit2 HelperUnit2.pas: TObjectHelper2 = class helper for TObject procedure Test; end; Unit SupportClasses,pas: uses HelperUnit1; type TMyClass: class end; Unit MainUnit.pas interface implementation uses SupportClasses, HelperUnit2; begin var MyClass:= TMyClass.Create; MyClass.Test; end; MyClass.Test will use the HelperUnit1.TObjectHelper1.Test implementation even if HelperUnit1 is not even in scope, let alone being "in nearest scope". So it appears that if a class helper is in scope where a class is defined, it is used unconditionally in all units of a project. If not, then what it is stated in the documentation applies.
  3. Anders Melander

    JSON benchmarks

  4. Arnaud Bouchez

    JSON benchmarks

    To be fair, the tests do not seem very realistic to me. And using any non-standard library for a core process like JSON should be not only with Delphi, but also with FPC. We are on the 21st century, and modern object pascal is not just Delphi. ;)
  5. Remy Lebeau

    Anonymous methods as interfaces

    That is correct. Basically, an anonymous method is implemented as an interfaced object with an Invoke() method that matches the signature of the anonymous method. https://stackoverflow.com/questions/39955052/how-are-anonymous-methods-implemented-under-the-hood Not by Embarcadero, as it is an implementation detail of the compiler. But it is a well-known implementation that is documented on numerous sites/blogs.
×