[HN Gopher] PHP compile time generics: yay or nay?
       ___________________________________________________________________
        
       PHP compile time generics: yay or nay?
        
       Author : moebrowne
       Score  : 29 points
       Date   : 2025-08-07 11:49 UTC (3 days ago)
        
 (HTM) web link (thephp.foundation)
 (TXT) w3m dump (thephp.foundation)
        
       | tobinfekkes wrote:
       | Can someone smarter than me explain what they mean by "reified
       | generics", "erased generics", and a use case for when to use one
       | over the other?
        
         | gloryjulio wrote:
         | Example, Java is using erased generics. Once the code is
         | compiled, the generics information is no longer in the
         | bytecode. List<String> becomes List<>. This is called type
         | erasure.
         | 
         | C# is using reified generics where this information is
         | preserved. List<String> is still List<String> after compilation
        
       ___________________________________________________________________
       (page generated 2025-08-10 23:00 UTC)