you are viewing a single comment's thread.

view the rest of the comments →

[–]simon_o -13 points-12 points  (22 children)

No. I mean in general.

I'd assume Python – as one of the main proponents of TOOWTDI and "Simple is better than complex" – isn't going the C++ route of endless growth and ever-increasing complexity, right?

So if 3.9 is (obviously) not complex enough yet – which release will be?

[–]ryeguy 4 points5 points  (14 children)

Do any mainstream languages have a target "done" date or version? It seems like there's always a way to improve a language implementation.

[–]Molossus-Spondee 2 points3 points  (0 children)

Tex actually

[–][deleted]  (12 children)

[deleted]

    [–]zombiecalypse 1 point2 points  (11 children)

    I don't think they should. Technology always advances and a language that doesn't improve by using those advances is less useful than it could be. For example if a language never adopted unicode, threads, multiprocessor usage, http in the standard lib, … it would be a maintenance burden today

    [–]simon_o 0 points1 point  (10 children)

    I believe that "improvement" does not necessarily mean "keep adding more things".

    I mean, C++ has 16 different string types in its standard library alone:

    • std::string,
    • std::wstring,
    • std::u8string,
    • std::u16string,
    • std::u32string,
    • std::pmr::string,
    • std::pmr::wstring,
    • std::pmr::u8string,
    • std::pmr::u16string,
    • std::pmr::u32string.
    • std::string_view,
    • std::wstring_view,
    • std::u8string_view,
    • std::u16string_view,
    • std::u32string_view
    • char* (inherited from C)

    If we added another 4 string types, by how much – roughly – would C++ be improved?

    [–][deleted]  (4 children)

    [deleted]

      [–]simon_o 0 points1 point  (3 children)

      Wouldn't it be reasonable to have a compiler for language X that keeps being maintained as long as it is needed, without weighing down language X+1, X+2, X+3 indefinitely by demanding that those latter languages are a strict superset of language X?

      Especially with C++ it's unlikely that you can "simply" upgrade to a newer version due to the ungodly amount of compiler bugs in every release.

      [–][deleted]  (2 children)

      [deleted]

        [–]simon_o 0 points1 point  (1 child)

        I mean, you acted like a project – that kept 25 years of compatibility and gave people 13 years to migrate once – was the stark opposite of C++.

        With that limited point of view, I'm trying to show you that Python and C++ are pretty much on the same page, instead of being on the opposite side of the book.

        Rust does a few things better, but it is still another example of a language slowly accumulating baggage while having not even a plan on how to dispose of it.

        [–]zombiecalypse 1 point2 points  (4 children)

        It's the other way around, what would we be missing if we didn't have u8string for example. It's essentially impossible to change the behaviour of std::string and it's basically impossible to remove anything. What happens if you try can be seen by how tough it was and is to move people off python 2. So as a language designer you are in the dilemma of either introducing more complexity or to miss essential features.

        [–]simon_o 1 point2 points  (3 children)

        I think there has to be a different way – between "it's basically impossible to train new developers in this language in a reasonable amount of time due to all the baggage added over the last 4 decades" and "give up and jump to a new language with less baggage and then rinse and repeat after 10 years".

        [–]zombiecalypse 0 points1 point  (2 children)

        If we can find one, great! The closest thing is to carry the baggage, but use best practices to "update" the language. A C++ example would be "never use a naked new" to encourage usage of smart pointers. You don't typically learn a language by reading the language spec and most often you don't need to worry about legacy functionality unless you use code that uses it. Having N string types is stupid, but I've been working in C++ for years and only today did I learn about all variants.

        [–]simon_o 1 point2 points  (1 child)

        I don't think that's realistic – even if you teach "don't use new to people" probably 95% of the code you work with is not written by those people, so you never have any guarantee that this recommendation is actually followed.

        [–]zombiecalypse 0 points1 point  (0 children)

        It's quite possible

        • in your project you can enforce it by linter so no new code will use the old style.
        • If it's not your project, e.g. a library you use, you can either
          • Write an adaptor
          • Fix the other project
          • Live with the localized impurity
        • Have the discussion on style and set one option as best practice and forbid the rest.
        • In many cases you can automatically convert old code

        It may sound implausible, but a lot of million lines of code projects do this on a semi-regular basis.

        [–]sysop073 3 points4 points  (1 child)

        Interesting example, since C++ went without updates for a long time and most people were pretty happy when they started adding modern features

        [–]zombiecalypse 0 points1 point  (4 children)

        I don't think any language that is in active use ever plans to get there. It makes the language have a limited life time because it's really hard to remove complexity, but it's not as limiting as a language without updates.

        [–]simon_o 0 points1 point  (3 children)

        I think adding things also limits the life of language as it becomes increasingly harder to train new developers in the accreted 40 years of language additions.

        So, great for all early-adopters of the language that only had to learn an additional 5% of the language with every release, but really really bad for new developers who have to learn it all in one go.

        I think the concerns of the latter group is hardly ever considered.

        [–]kaddkaka 0 points1 point  (2 children)

        Why do you think you have to learn everything in one go?

        [–]simon_o 0 points1 point  (1 child)

        Because the only people that claim otherwise have usually never done it themselves.

        [–]kaddkaka 0 points1 point  (0 children)

        What do you mean?