If nested classes have to be static to compile, why they're not static by default?

51 views
Skip to first unread message

dustContributor

unread,
Mar 19, 2016, 10:57:06 PM3/19/16
to Xtend Programming Language
Thats it. Why make me type the "static" modifier if I can't declare non-static nested classes at all? It could just be a default implicit modifier.

Norbert Sándor

unread,
Mar 20, 2016, 5:34:51 AM3/20/16
to Xtend Programming Language
I think it is for Java compatibility, future Xtend versions may support non-static nested classes (= inner classes) as well.
--
Norbi

dustContributor

unread,
Mar 23, 2016, 7:47:29 PM3/23/16
to Xtend Programming Language
Ah I see, I thought they'd simply outright not support "normal" nested classes. Certainly I'd like if all nested classes were static by default. Thanks for your answer.

Sven Efftinge (sven@efftinge.de)

unread,
Mar 24, 2016, 2:27:17 AM3/24/16
to xtend...@googlegroups.com
Yes we considered going down that path, but than decided to leave the option to have non static classes as well open.

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages