# AW:  PDM Meeting Notes

- Thread: https://externals.io/message/20246
- Original archive: https://news-web.php.net/php.internals/20246
- Started by Matthias Pigulla on 2005-11-22T20:22:16+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #20246 — Matthias Pigulla — 2005-11-22T20:22:16+00:00

URL: https://externals.io/message/20246#20246

Great, I have been waiting for this list sine Derick mentioned the
meeting in his talk at the conference :)

@Derick: There have been some questions and issues raised during your
talk... Dou you remember them? It was about reading from files with the
new unicode semantics, and you said these were some things you need to
discuss. I don't see anything that looks related... Do you remember what
it was about?

> 2.10 Dynamic class inheritance

Can someone elaborate a little on what this is supposed to be ;)?

> 5.2 Allow interfaces to specify the __construct() signature

> Discussion: We didn't see a reason why this shouldn't be allowed,
> but Andi seems to have a reason for it.
> Conclusions: Zeev asks Andi why he doesn't want constructors in 
> the interface. If there is no sound reason we add this
> possibility.

I had a discussion about this with a colleague recently. IMHO specifying
construcor signature does not make sense at all in interfaces... What is
that supposed to do at all? I mean - conceptually, what does it express?

> 5.3 Implement inheritance rules for type hints
> Issue: Currently we don't check inheritance rules for type-hinted
> parameters.

Could someone please explain what exactly is/is not checked?

> 5.4 Late static binding using "this" without "$" 
> (or perhaps with a different name)

Interesting feature :) I've been missing that on C# recently ;)

As to type hinting, has there ever been a discussion about allowing
string/int/... type hints? These could perform appropriate casts so you
don't need to make such checks at the beginning of every method you
write.

-mp.

---

## #20247 — Rasmus Lerdorf — 2005-11-22T20:34:07+00:00

URL: https://externals.io/message/20246#20247 · In reply to: #20246

Matthias Pigulla wrote:
> > […]
> 
> Can someone elaborate a little on what this is supposed to be ;)?

Also known as runtime inheritance, or late binding.  It's not a new 
thing, we have it today.  The discussion was about whether to have a way 
to disable this and force people to define their classes at the 
top-level of scripts and to define them in the correct order so all 
binding can be done at compile-time which is of course faster.  The 
conclusion was that this could be done at the opcode cache level.

> I had a discussion about this with a colleague recently. IMHO specifying
> construcor signature does not make sense at all in interfaces... What is
> that supposed to do at all? I mean - conceptually, what does it express?

Just like any other signature in an instance, it tells anything that 
implements the interface that it must have a constructor and that 
constructor must meet the definition in the interface.  Useful for 
object factories.  In most cases you don't want to force a specific 
constructor in which case you wouldn't specify it in the interface, but 
I see no reason why you shouldn't be allowed to specify it there if you 
want to.

> As to type hinting, has there ever been a discussion about allowing
> string/int/... type hints? These could perform appropriate casts so you
> don't need to make such checks at the beginning of every method you
> write.

Yes, a lot of folks are strongly against going down that route.

-Rasmus

---

## #20253 — Marcus Boerger — 2005-11-22T22:44:53+00:00

URL: https://externals.io/message/20246#20253 · In reply to: #20246

Hello Matthias,

Tuesday, November 22, 2005, 9:22:16 PM, you wrote:

> > […]

> Can someone elaborate a little on what this is supposed to be ;)?

Binding static members at run time rather than compile time. See the notes
for an example that shows the difference. Usage example again factories.

> > […]

> Could someone please explain what exactly is/is not checked?

From a typesystem point of view it would be perfectly leagal to change the
typehint in a derived class as long as that respects is-a relation with the
parent. Since the explanation is a bit complex, not what most people expect
we live with the simple disagreement. And since most languages do not
respect this correct or not at all anyway there is obviously no real common
usecase for it. So PHP can live without that too (imo).

Best regards,
 Marcus
