Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java namespaces

Name: Anonymous 2013-12-05 12:37

It always annoyed me that Java has no formal support for structural or procedural programming, but still tries to hack it in with the "static" keyword, effectively turning classes and interfaces into namespaces. What if namespaces were included in Java 8? They'd be identical to classes, but all their members would be public and static by default. Example:


public namespace Math
{
    final double PI = 3.141592654; //public and static by default

    double abs(double a) //public and static by default
    {
        ...
    }

    ...
}


Am I a genius or what?

Name: Anonymous 2013-12-06 5:24

>>3
java is shit

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List