This is a completely logical question ... I work with Java and C #, and this is my big pet ... In fact, almost every language there has a kind of anonymous type lol ... PHP, JavaScript, C #, vb (all), and the list goes on ..
This is a very useful feature when you basically throw data into an object, and you don't need a class to create it.
In fact, this is exactly what LINQ uses ..
var someObject (can be interable/Enumerable) =
from p in products
where p.id == 123
select new { productid };
blah blah, you get the idea .. This is very useful ... :-)
Hurrah!
source
share