Hello all,

I'll start by saying I've been lurking for about six weeks and reading 
everything on the list since then although I was on the list for a short period 
many years ago.  

I recently took on a role as "WordPress Engineering Team Lead" and as such have 
gotten much more interested in revisiting PHP's feature set hence why I 
rejoined the list.  I've been working with PHP for 12 years, programming 
professionally for 32 years and GoLang the last 1+ years. So while I specialize 
in WordPress and PHP/MySQL, my experience has been in other frameworks and 
languages for most of my professional programming career.

I have been planning to write up an RFC regarding union types, but had not 
found the time. Seeing that Nikita has started a new RFC for Union Types v2 — 
how do you all keep up with that guy?!? — I realized that I better get these 
ideas at somewhat documented and presented or the train will have fully left 
the station.

What I am proposing can be layered on top of Nikita's proposal, and was 
influenced by what I have learned using Go. It is not a Go feature, but 
inspired by the Go interface{} type (which is a very different concept compared 
to interfaces in PHP, btw.)

It is a straw man proposal which means it is not a fully-fleshed out RFC, but 
if I waited until I had the time to write an RFC then PHP 8 might already be 
out:

Without further ado:

https://gist.github.com/mikeschinkel/50aec7094f5643223d28674639f9f117 
<https://gist.github.com/mikeschinkel/50aec7094f5643223d28674639f9f117>


Since I'm effectively new to the list this time please go easy on me? :-)

Thanks in advance for all your consideration.

-Mike Schinkel


Reply via email to