Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

I program in Scala, so structs are not a thing (classes can extend/"inherit" AnyVal to be allocated on the stack, though, I think). Functions are nice, but from a pure syntax standpoint I often prefer methods because it limits the parantheses. It's especially neat when the methods take no arguments, like .toString.

But yeah, otherwise there's no difference, really.



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

Search: