• Alternatives to C (was Re: Safety of casting from 'long' to 'int')

    From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.lang.c,comp.lang.misc on Sun May 10 13:05:35 2026
    From Newsgroup: comp.lang.misc

    In article <10tpt9j$c3i4$1@dont-email.me>, Bart <bc@freeuk.com> wrote:
    On 10/05/2026 05:39, Janis Papanagnou wrote:
    [snip]
    What makes you think that I'd need to write an own language given that
    there's a plethora of languages of all kinds and paradigms existing.

    So where's the one that works like mine?

    I mean, Rust does exactly what you were just describing.

    And why are there so many new ones still appearing? Most of them you
    will not know about.

    Consider the possibility that you may be unique in the world in
    possessing the combination of requirements and aesthetic
    judgement that makes you feel you need a language like yours.

    As for new languages, there are a number of reasons. Most of
    them are not particularly relevant here.

    At this point, you may consider doing what Keith suggested, and
    moving further discussion of your language to comp.lang.misc.
    Here, I'll start by cross-posting to that group for you.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bart@bc@freeuk.com to comp.lang.misc,comp.lang.c on Tue May 12 02:28:15 2026
    From Newsgroup: comp.lang.misc

    On 10/05/2026 14:05, Dan Cross wrote:
    In article <10tpt9j$c3i4$1@dont-email.me>, Bart <bc@freeuk.com> wrote:
    On 10/05/2026 05:39, Janis Papanagnou wrote:
    [snip]
    What makes you think that I'd need to write an own language given that
    there's a plethora of languages of all kinds and paradigms existing.

    So where's the one that works like mine?

    I mean, Rust does exactly what you were just describing.

    Rust could hardly be more different than mine.

    And why are there so many new ones still appearing? Most of them you
    will not know about.

    Consider the possibility that you may be unique in the world in
    possessing the combination of requirements and aesthetic
    judgement that makes you feel you need a language like yours.

    My language fills the same niche that C does.

    I don't have much of a problem with the things that C can do, but with
    how it does it, its syntax, its ancient baggage, its quirks, its
    folklore, its Unix-centric ecosystem, its pointless UBs, its insistence
    in working with every oddball processor, its solving every shortcoming
    with macros, its adherents who will defend every misfeature to the death...

    Maybe the answer is to just create my own language?! I did exactly that,
    and didn't to have to deal with C for 10-15 years, but you can't get
    away from it because it's everywhere.

    It is also frustrating looking at C forums and people thinking they are
    too stupid to grasp something when it's language that could have been
    better.

    As for new languages, there are a number of reasons. Most of
    them are not particularly relevant here.

    At this point, you may consider doing what Keith suggested, and
    moving further discussion of your language to comp.lang.misc.

    Sure, a pretty much dead group.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Keith Thompson@Keith.S.Thompson+u@gmail.com to comp.lang.misc,comp.lang.c on Mon May 11 18:37:05 2026
    From Newsgroup: comp.lang.misc

    Bart <bc@freeuk.com> writes:
    [...]
    I don't have much of a problem with the things that C can do, but with
    how it does it, its syntax, its ancient baggage, its quirks, its
    folklore, its Unix-centric ecosystem, its pointless UBs, its
    insistence in working with every oddball processor, its solving every shortcoming with macros, its adherents who will defend every
    misfeature to the death...

    You're mostly wrong about that last point. Many of us spend a
    great deal of time and effort here *explaining* how C is defined
    and how best to use it.

    To explain is not to defend. What will it take for you to understand
    that?

    [...]

    It is also frustrating looking at C forums and people thinking they
    are too stupid to grasp something when it's language that could have
    been better.

    (I'm going to assume I parsed that sentence correctly.)

    Nobody has said that C couldn't have been better. But it could
    hardly have been more successful. As Dennis Ritchie himself said,
    "C is quirky, flawed, and an enormous success."

    [...]
    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.lang.misc,comp.lang.c on Tue May 12 02:40:31 2026
    From Newsgroup: comp.lang.misc

    In article <10ttvng$1j579$1@dont-email.me>, Bart <bc@freeuk.com> wrote:
    On 10/05/2026 14:05, Dan Cross wrote:
    In article <10tpt9j$c3i4$1@dont-email.me>, Bart <bc@freeuk.com> wrote:
    On 10/05/2026 05:39, Janis Papanagnou wrote:
    [snip]
    What makes you think that I'd need to write an own language given that >>>> there's a plethora of languages of all kinds and paradigms existing.

    So where's the one that works like mine?

    I mean, Rust does exactly what you were just describing.

    Rust could hardly be more different than mine.

    You were describing what Rust calls, `include_str!` and
    `include_bytes!`. That's what I was referring to.

    https://doc.rust-lang.org/std/macro.include_str.html https://doc.rust-lang.org/std/macro.include_bytes.html

    And why are there so many new ones still appearing? Most of them you
    will not know about.

    Consider the possibility that you may be unique in the world in
    possessing the combination of requirements and aesthetic
    judgement that makes you feel you need a language like yours.

    My language fills the same niche that C does.

    I don't have much of a problem with the things that C can do, but with
    how it does it, its syntax, its ancient baggage, its quirks, its
    folklore, its Unix-centric ecosystem, its pointless UBs, its insistence
    in working with every oddball processor, its solving every shortcoming
    with macros, its adherents who will defend every misfeature to the death...

    Maybe the answer is to just create my own language?! I did exactly that,
    and didn't to have to deal with C for 10-15 years, but you can't get
    away from it because it's everywhere.

    So like I said, you may be unique in the world in possessing the
    combination of requirements _and aesthetic judgement_ that makes
    you feel you need a language exactly like yours.

    I think you'll find very few "adherents who will defend every
    misfeature to the death."

    It is also frustrating looking at C forums and people thinking they are
    too stupid to grasp something when it's language that could have been >better.

    The problem you keep encountering here, specifically, is that by
    your own admission you do not know C, the language, well enough
    to accurately understand what would have made it a "language
    that could have been better."

    As for new languages, there are a number of reasons. Most of
    them are not particularly relevant here.

    At this point, you may consider doing what Keith suggested, and
    moving further discussion of your language to comp.lang.misc.

    Sure, a pretty much dead group.

    Maybe you could liven it up.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bart@bc@freeuk.com to comp.lang.misc,comp.lang.c on Tue May 12 15:11:03 2026
    From Newsgroup: comp.lang.misc

    On 12/05/2026 03:40, Dan Cross wrote:
    In article <10ttvng$1j579$1@dont-email.me>, Bart <bc@freeuk.com> wrote:
    On 10/05/2026 14:05, Dan Cross wrote:
    In article <10tpt9j$c3i4$1@dont-email.me>, Bart <bc@freeuk.com> wrote: >>>> On 10/05/2026 05:39, Janis Papanagnou wrote:
    [snip]
    What makes you think that I'd need to write an own language given that >>>>> there's a plethora of languages of all kinds and paradigms existing.

    So where's the one that works like mine?

    I mean, Rust does exactly what you were just describing.

    Rust could hardly be more different than mine.

    You were describing what Rust calls, `include_str!` and
    `include_bytes!`. That's what I was referring to.

    https://doc.rust-lang.org/std/macro.include_str.html https://doc.rust-lang.org/std/macro.include_bytes.html

    OK, so some specific features. I don't know Rust, other than when I
    first starting testing its compiler in 2021, it was one of the slowest
    I'd ever tried.

    However it is interesting that it includes both 'str' and 'byte'
    versions which mirror my 'strinclude/sinclude' and 'binclude'.

    C23 now has '#embed', although its operation is much clunkier. To try it though I needed to download a new version, and used 16.x. I was
    interested in how fast it could deal with large embedded data, and tried
    this program:

    #include <stdio.h>
    #include <string.h>

    char str[] = {
    #embed "big.txt"
    ,0
    };

    int main(void) {
    printf("%zu\n", sizeof(str));
    printf("%zu\n", strlen(str));
    }

    'big.txt' contains 100 million 'A's, not zero-terminated. The ',0' will
    do that (I understand attributes can be used to control that).

    As for speed, I was pleasantly surprised: compiling this took 5 seconds.

    (While #embed notionally produces a token list like 65,65,...., it must
    handle it internally far more efficiently, especially within the
    intermediate assembly.)

    Still, with my language where it looks like this:

    []char str = sinclude("big.txt") # sinclude adds the terminator

    it took only one second. (However, I don't use intermediate ASM so it
    can be streamlined.)

    It is also frustrating looking at C forums and people thinking they are
    too stupid to grasp something when it's language that could have been
    better.

    The problem you keep encountering here, specifically, is that by
    your own admission you do not know C, the language, well enough
    to accurately understand what would have made it a "language
    that could have been better."

    That's like saying I can't compare one car with another, because I don't understand the internals or rationale of the one I criticise.

    I do however understand the tasks I expect them to do, and can speak
    about my experiences of using each.

    So I don't need to care why that car behaves as it does; doing so will
    not make the experience any better!

    I brought up a Model T analogy for C the other day, and it is apt.

    This actually applies to anybody; they don't need to be involved in
    making their own vehicles. But if they are, then they will be in a
    position to fix shortcomings.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bart@bc@freeuk.com to comp.lang.misc,comp.lang.c on Tue May 12 22:32:30 2026
    From Newsgroup: comp.lang.misc

    On 12/05/2026 02:37, Keith Thompson wrote:
    Bart <bc@freeuk.com> writes:
    [...]
    I don't have much of a problem with the things that C can do, but with
    how it does it, its syntax, its ancient baggage, its quirks, its
    folklore, its Unix-centric ecosystem, its pointless UBs, its
    insistence in working with every oddball processor, its solving every
    shortcoming with macros, its adherents who will defend every
    misfeature to the death...

    You're mostly wrong about that last point. Many of us spend a
    great deal of time and effort here *explaining* how C is defined
    and how best to use it.

    I don't see the connection with my point. I haven't said that people
    don't explain things.

    But it does seem that every poor feature in C is an invaluable asset to somebody, that must never be fixed.

    So the inconvenience of how 'switch' works is excused because
    /sometimes/ you need fallthrough, or the one time in a thousand you need Duff's device.

    To explain is not to defend. What will it take for you to understand
    that?

    [...]

    It is also frustrating looking at C forums and people thinking they
    are too stupid to grasp something when it's language that could have
    been better.

    (I'm going to assume I parsed that sentence correctly.)

    Nobody has said that C couldn't have been better. But it could
    hardly have been more successful. As Dennis Ritchie himself said,
    "C is quirky, flawed, and an enormous success."

    Yeah, it's one of the great mysteries. Even half a century ago, there
    were big companies and lots of clever people, who could have cranked out
    a suitable systems language of equal capability to C in their sleep, but
    with fewer rough edges.

    I wonder why they didn't? Maybe they would have been aimimg too high
    even then? (Instead we got Smalltalk and Ada.)


    [...]


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to comp.lang.misc,comp.lang.c on Tue May 12 15:28:53 2026
    From Newsgroup: comp.lang.misc

    On Tue, 12 May 2026 22:32:30 +0100
    Bart <bc@freeuk.com> wrote:
    Even half a century ago, there were big companies and lots of clever
    people, who could have cranked out a suitable systems language of
    equal capability to C in their sleep, but with fewer rough edges.

    I wonder why they didn't?
    I am reminded of Seymour Cray's rebuttal to Tom Watson:
    "I understand that in the laboratory developing this system there are
    only 34 people, 'including the janitor.' Of these, 14 are engineers and
    4 are programmers, and only one has a Ph. D., a relatively junior
    programmer. To the outsider, the laboratory appeared to be cost
    conscious, hard working and highly motivated.
    Contrasting this modest effort with our own vast development
    activities, I fail to understand why we have lost our industry
    leadership position by letting someone else offer the worldrCOs most
    powerful computer."
    "It seems like Mr. Watson has answered his own question."
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.lang.misc,comp.lang.c on Tue May 12 23:21:59 2026
    From Newsgroup: comp.lang.misc

    Bart <bc@freeuk.com> writes:
    On 12/05/2026 02:37, Keith Thompson wrote:
    Bart <bc@freeuk.com> writes:
    [...]
    <snip>

    Nobody has said that C couldn't have been better. But it could
    hardly have been more successful. As Dennis Ritchie himself said,
    "C is quirky, flawed, and an enormous success."

    Yeah, it's one of the great mysteries. Even half a century ago, there
    were big companies and lots of clever people, who could have cranked out
    a suitable systems language of equal capability to C in their sleep, but >with fewer rough edges.

    Those clever people _were_ cranking out suitable systems languages
    by the bucketful. PL/1, Algol derivatives, proprietary internal
    languages (Burroughs SPRITE and BPL languages), HP-3000 SPL (Systems Programming Language - I used SPL in the late 70s) and
    on the academic side, modula, ADA, Pascal (yes, it could be
    a systems programming language, c.f. VAX-11 Pascal).

    They weren't aiming at your 70's target 8080 processors, although
    there was PL/M and a few others for the 8080 at the time.

    https://en.wikipedia.org/wiki/PL/M

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.lang.misc,comp.lang.c on Wed May 13 02:49:34 2026
    From Newsgroup: comp.lang.misc

    On 2026-05-13 00:28, John Ames wrote:
    On Tue, 12 May 2026 22:32:30 +0100
    Bart <bc@freeuk.com> wrote:

    Even half a century ago, there were big companies and lots of clever
    people, who could have cranked out a suitable systems language of
    equal capability to C in their sleep, but with fewer rough edges.

    I wonder why they didn't?

    I am reminded of Seymour Cray's rebuttal to Tom Watson:

    "I understand that in the laboratory developing this system there are
    only 34 people, 'including the janitor.' Of these, 14 are engineers and
    4 are programmers, and only one has a Ph. D., a relatively junior
    programmer. To the outsider, the laboratory appeared to be cost
    conscious, hard working and highly motivated.

    Contrasting this modest effort with our own vast development
    activities, I fail to understand why we have lost our industry
    leadership position by letting someone else offer the worldrCOs most
    powerful computer."

    "It seems like Mr. Watson has answered his own question."

    Hmm.. - I wonder what the amount of involved people is supposed to
    tell us here? - There's sophisticated languages where international
    committees with many members spent huge efforts, and there's also
    extremely ambitious languages where less than a handful of experts
    designed and developed it. - I mean, now concerning "C", does that
    in any way makes the difference or explains anything concerning the
    actual "C" design (with its strengths and with its shortcomings and
    inherent deficiencies)?

    My (very subjective) impression is that "leadership positions" were
    primarily defined by other factors the past decades; spanning from
    commercial market-power to thorough marketing activities.

    Janis

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.lang.misc,comp.lang.c on Wed May 13 02:53:22 2026
    From Newsgroup: comp.lang.misc

    On 2026-05-13 01:21, Scott Lurndal wrote:
    Bart <bc@freeuk.com> writes:
    On 12/05/2026 02:37, Keith Thompson wrote:
    [...]

    Yeah, it's one of the great mysteries. Even half a century ago, there
    were big companies and lots of clever people, who could have cranked out
    a suitable systems language of equal capability to C in their sleep, but
    with fewer rough edges.

    Those clever people _were_ cranking out suitable systems languages
    by the bucketful. PL/1, Algol derivatives, proprietary internal
    languages (Burroughs SPRITE and BPL languages), HP-3000 SPL (Systems Programming Language - I used SPL in the late 70s) and
    on the academic side, modula, ADA, Pascal (yes, it could be
    a systems programming language, c.f. VAX-11 Pascal).

    [...]

    I wonder about why you put Ada just in the "academic box".

    Janis

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.lang.misc,comp.lang.c on Wed May 13 14:15:27 2026
    From Newsgroup: comp.lang.misc

    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    On 2026-05-13 01:21, Scott Lurndal wrote:
    Bart <bc@freeuk.com> writes:
    On 12/05/2026 02:37, Keith Thompson wrote:
    [...]

    Yeah, it's one of the great mysteries. Even half a century ago, there
    were big companies and lots of clever people, who could have cranked out >>> a suitable systems language of equal capability to C in their sleep, but >>> with fewer rough edges.

    Those clever people _were_ cranking out suitable systems languages
    by the bucketful. PL/1, Algol derivatives, proprietary internal
    languages (Burroughs SPRITE and BPL languages), HP-3000 SPL (Systems
    Programming Language - I used SPL in the late 70s) and
    on the academic side, modula, ADA, Pascal (yes, it could be
    a systems programming language, c.f. VAX-11 Pascal).

    [...]

    I wonder about why you put Ada just in the "academic box".

    Because the first ADA compiler I used came from NYU. :-)

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Keith Thompson@Keith.S.Thompson+u@gmail.com to comp.lang.misc,comp.lang.c on Wed May 13 12:30:36 2026
    From Newsgroup: comp.lang.misc

    scott@slp53.sl.home (Scott Lurndal) writes:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    [...]
    I wonder about why you put Ada just in the "academic box".

    Because the first ADA compiler I used came from NYU. :-)

    It's Ada, not ADA. It's a person's name, not an acronym.

    And along with C, it's one of the few languages whose name is a
    hexadecimal palindrome.
    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    void Void(void) { Void(); } /* The recursive call of the void */
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.lang.misc,comp.lang.c on Wed May 13 20:20:58 2026
    From Newsgroup: comp.lang.misc

    In article <10u2jgv$2t96p$5@kst.eternal-september.org>,
    Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
    scott@slp53.sl.home (Scott Lurndal) writes:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
    [...]
    I wonder about why you put Ada just in the "academic box".

    Because the first ADA compiler I used came from NYU. :-)

    It's Ada, not ADA. It's a person's name, not an acronym.

    Perhaps Scott was alluding to its design reminding one of the
    era in which only upper case characters were available on one's
    teletype. :-D

    - Dan C.

    (I'm kidding again. I actually don't think Ada is a terrible
    language.)
    --- Synchronet 3.22a-Linux NewsLink 1.2