Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-03

Helpers for objects (not classes)

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Haines

Hi,

Do the new class helpers support objects?

If this is not implemented how much work (1-10) is it to do?

Thanks,

Andrew

Sven Barth
to Andrew Haines
Andrew Haines wrote 5 lines
Hi, Do the new class helpers support objects? If this is not implemented how much work (1-10) is it to do?

No, it's currently not supported, but it wouldn't be that hard to add. In fact that's somewhere on my ToDo list as well as helpers for interfaces.

Regards,
Sven

Michael Schnell
to Andrew Haines: Do the new class helpers support objects? If this is not implemented how much work (1-10)…
Andrew Haines wrote
Do the new class helpers support objects?

Are "Objects" not depreciated, anyway ?

IMHO "Object" and "Record" should just be subsumed under the Class concept, so that the "Object" and "Record" keyword can be avoided a certain modifier "Class" creates the appropriate types (of course keeping the
"Object" and "Record" language construct as syntax candy for compatibility.

With that helpers and some more stuff would be ubiquitously usable.

-Michael

Sven Barth
to Michael Schnell
"Michael Schnell" wrote 7 lines
On 03/23/2015 09:39 PM, Andrew Haines wrote: > > > Do the new class helpers support objects? > Are "Objects" not depreciated, anyway ?

Not in FPC.

IMHO "Object" and "Record" should just be subsumed under the Class

concept, so that the "Object" and "Record" keyword can be avoided a certain modifier "Class" creates the appropriate types (of course keeping the

"Object" and "Record" language construct as syntax candy for

compatibility.

No. Classes and records/objects are way to different. Even classes and objects have enough differences that merging them would lead to problems.

With that helpers and some more stuff would be ubiquitously usable.

Most stuff added for classes is already useable for objects, because they share quote some code in the compiler. Helpers currently explicitly exclude objects (and interfaces).

Regards,
Sven