Sign in Join

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

Mailing lists / fpc-devel / 2014-02

Issue 0025028 (Florian)

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Thaddy

This is marked as won't fix.
I do not fully understand that.

In Delphi, an interface is given a guid internally whatsoever it is declared.
In FPC, this mechanism is also in place.

I refer:

IWhatEverInterface = _*type *_IInterface;  // which has a guid.. and
type inference works correctly

I am a known - but well meaning - idiot, but can you please explain why you closed this as "won't fix" as the issue seems to be completely fixable and reasonable.

Regards,

Thaddy,

Reply by email

Flávio Etrusco
to Thaddy

Just a few points, since nobody replied yet ;-)

Thaddy wrote 5 lines
This is marked as won't fix. I do not fully understand that. In Delphi, an interface is given a guid internally whatsoever it is declared.

Are you sure about that? I remember different for Delphi 7.

Show quoted text 6 lines
In FPC, this mechanism is also in place. I refer: IWhatEverInterface = type IInterface; // which has a guid.. and type inference works correctly

But this doesn't generate a new GUID (if you create an object that implements only IInterface, testing "is IWhatEverInterface" returns true).

Show quoted text 7 lines
I am a known - but well meaning - idiot, but can you please explain why you closed this as "won't fix" as the issue seems to be completely fixable and reasonable. Regards, Thaddy,

If Delphi indeed behaves like that then maybe it's valid RFE for Delphi mode. OTOH automatically generating a GUID defeats a few features of having a stable GUID. And even if fpc could avoid modifying the GUID on every modification inside the unit by reading the PPU (which I don't believe it does), deleting the PPU would modify it. And then there's the added (little?) overhead, and the cases where you really don't want to allow IS and AS, and probably other technical implications I'm not aware ;-)

Best regards,
Flávio

Reply by email

Florian Klaempfl
to Flávio Etrusco
Flávio Etrusco wrote 8 lines
If Delphi indeed behaves like that then maybe it's valid RFE for Delphi mode. OTOH automatically generating a GUID defeats a few features of having a stable GUID. And even if fpc could avoid modifying the GUID on every modification inside the unit by reading the PPU (which I don't believe it does), deleting the PPU would modify it. And then there's the added (little?) overhead, and the cases where you really don't want to allow IS and AS, and probably other technical implications I'm not aware ;-)

Indeed, furthermore, there might be reasons where people want interfaces without GUIDs and pascal is a language which tries to prevent to do things implicitly.

Reply by email