Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This was the whole basis of C#'s grandaddy C++, was it not? Thinking "What if structs didn't just have data, but methods?" The Class was born, but it is basically still a superset of 'struct'. I guess the wrinkle here is that is specifically a main() but the article payoff singularly fails to deliver. "This compiles" is rather unenlightening.


Struct in C# means type has "by value semantics", whereas class in c# means "reference type", so the keywords have a quite different usage compared to C++, where it's about whether public/private is default. Still a frivolous and "so what" blog post though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: