• Re: Something about my ideal C/C++

    From Mad Hamish@21:1/5 to wij on Fri Aug 30 13:34:51 2024
    On Thu, 29 Aug 2024 09:08:43 +0800, wij <wyniijj5@gmail.com> wrote:

    Last time talked with David, we had a differnet view of assembly (might be just
    differnet wording).
    Then I think now, C/C++ is essentially not very different from assembly, for >example, if we use bits-specified types:

    Have fun building an enterprise level web-app in assembly

    int16_t a=2;
    int8_t b=a;
    uint32_t c=a;

    Such coding is not really different form assembly. But if we use int/char/long:

    int a=2;
    char b=a;
    long c=a;


    Variable definition is a very small part of a language, and most
    languages have large standard libraries which provide a lot of
    functionality

    To verify this view, suppose we have a large (or high resolution) screen, or >something like HTML hyper-link that allow us to see the detail at will...
    at least, lots of the view of what source code might change, and thus the >language.

    That's part of why you split things into functions
    you see
    list.sort()
    and you can go to the sort function to see how it's sorted if it's
    relevant (say you're investigating something not being sorted
    correctly or the sort being slow)

    By using high level (shorter) languages, the first thing is the model. What is >the model of C/C++?. No language I know is precise about the model.

    C++ supports multiple models

    The 3rd. problem is that complexity does not go away. It does not disapper >because you call it 'exception' (the bad for 'exception' is that it disable you to use 'exception' in
    thinking) or whatever, the real exception (or whatever)
    will go way or thus handled. What can appear in assembly will (mostly) also >appear in high level language.

    The complexity can be managed more easily and a lot of things are
    handled automatically by the compiler or run time

    I like to use higher level language, just to express some possible properties >about the 'ideal high level language' (from assembly) I can hope for.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)