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

There does seem to be broad agreement across a range of typed languages -- TypeScript, Swift, Kotlin, ES6 + Flow -- about notations for classes, control flow and data structure declaration.

But true convergence remains far away...



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.


Is this broad agreement due to theoretical alignment, or a deliberate attempt to increase programmer adoption?

If true convergence happened, there wouldn't be a need for different languages. :-)


I think there is real convergence. All serious new languages have some form of static typing augmented with some form of type inference. All are lexically scoped. All have first-class functions and map/reduce/filter. None have unchecked manual memory management. None have checked exceptions.

There are still areas of debate, but at the same time I think there is real progress; we have learnt from past mistakes and they won't be repeated.


Some of it is due to theoretical alignment. For example, succinct function expressions come out of the the desire to simplify use of functional programming. Another example is the adoption of ML-style type notation: we want people to use static types, we want it to be easy, and we want types to be expressive -- <var>: <type> allows <type> to contain some spaces and punctuation while still being clear.




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

Search: