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

Don't forget that Scala preceded all of the languages you've listed, which in my opinion shows where the inspiration came from for some of them. Of course, I'm sure that Scala drew inspiration from some of its predecessors.


Some of the conventions:

    // Type indicated with `:`, type follows variable; value follows type.
    variable: Type
    variable: Type = "value"

    // Generics with <>
    strings: List<String>

    // Operator overloading.
    text = "a" + "b"
    num = 1 + 2

    // Capitalize type names.
    class TheClass { ... }

    // Use braces for delimiting.
    class TheClass { ... }
Most of the conventions we're talking about were adopted by Scala; but we can see they also predate Scala. Many can be found in C++. The type/variable notation is very old, going back to ML and truthfully going back to mathematical notation.




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

Search: