• What do people like on C what Pascal don't have

    From F. W.@21:1/5 to All on Tue Oct 11 10:01:23 2022
    Even if I think about Call by Value/Call by Reference or switch vs.
    case, I like Pascal much more.

    What do people fascinate on C?

    I worked years as a C-Programmer. But privately I always preferred
    Pascal. I like to take care of the project rather than the tool.

    FW

    --
    https://odlinfo.bfs.de/ODL/DE/home/home_node.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From G.K.@21:1/5 to F. W. on Wed Dec 7 05:01:04 2022
    XPost: alt.comp.lang.pascal

    On 10/11/22 03:01, F. W. wrote:
    Even if I think about Call by Value/Call by Reference or switch vs.
    case, I like Pascal much more.

    What do people fascinate on C?

    I worked years as a C-Programmer. But privately I always preferred
    Pascal. I like to take care of the project rather than the tool.

    FW

    #1 is compilation speed. C is horrible for this, especially for big
    projects.

    Then there is the syntax clarity. It is easy to write unintelligible
    chicken scratch with C. Not so easy with Pascal.

    Pascal allows clear, old-school, 'name it and claim it' procedural
    structure in which one never needs to manage memory. I can write complex programs using FreePascal without ever managing variable memory and the compiler just takes care of it automatically and frees everything automatically. This is my favorite way of doing it, and one less huge
    mess of errors that are avoided. It also makes the compiled binaries
    really fast when doing it this way since the compiler puts in the code
    to handle it automatically and efficiently.

    Modularity of structure. Pascal is by default a modular language. It is
    easy to break the codebase up into separate modules arranged logically.
    Messing with C headers can make this approach painful and error-prone.

    Compiler errors are often easy to understand without playing sleuth.

    One thing I don't like about Modern Pascal is that it seems to have
    abandoned low-level stuff like booting and operating systems. Now it is
    all seemingly geared to hook into the OS. That's not a bad thing, but
    having only that to me is a bad thing.

    I would like to be able to write my own OS strictly with Pascal. The
    bare metal stuff could fall under a single compiler mode, or a group of
    modes:

    {$MACHINE} {$BOOT} {$EFI} {$BIOS} {$RING0} {$KERNEL} {$FILESYSTEM}
    {$ROM} {$MEDIA} {$USB} {$DRIVER} {$VGA} {$GRAPHICS} ... etc.

    Then over time contributors could add modules for different platform
    targets to each machine mode library, and a new parent machine mode that
    hooks programs into whatever kernel is compiled by it, so the rest of
    the code and additional programs could remain platform-independent.

    If I could do it without any C or direct assembler I would get started
    right away. I would write a simple toy os to get started, then begin
    expanding it, and push a few utility units to the maintainers that would
    make it easier for others.

    To have a well-tooled mode system strictly for bare metal constructs
    would be a dream.

    --

    G.K.

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