On 01/19/2014 10:49 PM, Sara Golemon wrote:
Was there some technical difficulty that stopped the work on
generics when it was first brought up, or did you just realize that it would
never get through ??
A little from column A, a little from column B.
None of the technical challenges were insurmountable, but the
temperature for Generics felt tepid at the time (not nearly a 2/3
majority), so it was back-burnered for more productive stuff. Reckon
the mood has changed in the past year or so?
-Sara
I'm not really sure that it has, and if it has, it's only because people view it as an overhead free way of achieving what we set out to achieve here, even though its not really, the actual type hint would be ... I digress ... I don't really think anyone is thinking it through ...
When you think about it, we couldn't just introduce generics right now, we have an incomplete type hinting system and it's terribly inconsistent for new HashMap<int, string>() to be valid but not have the ability to hint for int or string elsewhere.
It could be done, but it seems ... horrible ... I really think scalar hints have to be supported before generics, and there are so many patches for that and even more opinions, I'm not even sure we are capable of coming to the right decision, we haven't yet, the correct patch for scalar hinting exists, has done for a while ...
To a lesser extent, you would want return type hints too, if nothing other than to give the compiler every opportunity to detect inconsistency in the actual use of generics before we get as far as execution.
That said, I'd love it, quite happily will put time into working on any of the things I mentioned, but I have literally no idea how to change minds ...
Any, or all of the things I just said are not small changes, aimed at introducing completely alien concepts, alien both to the language and the people using PHP ... a completely new programming paradigm, that's really not what we were going for at all here, a simple type hint was all.
I know you know all of what I just said, but for those reading ..
Cheers
Joe