home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,331 of 243,242   
   bart to BGB   
   Re: Nice way of allocating flexible stru   
   17 Oct 25 22:07:03   
   
   From: bc@freeuk.com   
      
   On 15/10/2025 19:00, BGB wrote:   
   > On 10/15/2025 5:26 AM, bart wrote:   
   >> On 15/10/2025 02:13, BGB wrote:   
   >>   
   >>> Apparently the languages people are trying to push as C replacements   
   >>> are mostly Rust, Zig, and Go.   
   >>>   
   >>> None of these particularly compel me though.   
   >>>    They seem more like needless deviations from C than a true successor.   
   >>   
   >> So what would a true successor look like?   
   >>   
   >   
   > Probably sorta like C with a few vaguely C++ like features, but with a   
   > cleaner and simpler design.   
   >   
   > Should ideally be usable for similar stuff to C.   
   >    Not drastically or needlessly different.   
      
   Well, my own language is somewhere at the level of C, yet it looks very   
   different.   
      
   It was a rather crude affair in 1981/82, it has now evolved some modern   
   conveniences. But I deliberately keep it low-level.   
      
      
   This is a C program to print some square roots:   
      
      #include    
      #include    
      
      int main() {   
           for (int i=1; i<=10; ++i)   
               printf("%d %f\n", i, sqrt(i));   
      }   
      
      
   This is it in my language (all are complete programs):   
      
      proc main=   
          for i to 10 do   
              println i, sqrt i   
          od   
      end   
      
      
   Finally, this is it in Zig:   
      
      const std = @import("std");   
      
      pub fn main() void {   
          for (1..11) |i| {   
              std.debug.print("{} {}\n", .{i, @sqrt(@as(f64,   
   @floatFromInt(i)))});   
          }   
      }   
      
      
   This one is interesting in making the C version look remarkably clean   
   and uncluttered by comparison!   
      
   But, yeah, I NEED it to look different from C as I find C syntax   
   unreadable; it's a kind of 'C-blindness' where source looks more like a   
   block Mime-encoded text.   
      
      
   >> But it is so utterly unlike either of those, that if it's from the   
   >> same family, then it must have been adopted.   
   >>   
   >   
   > Idea is that it went ALGOL -> BCPL -> B -> C.   
   >    Going the other way, ALGOL was derived from FORTRAN.   
      
   BCPL also looks quite unlike Algol. If C's progression from Algol was   
   via BCPL, which lost some features, then the claim that it came from   
   Algol makes even less sense.   
      
   I've also heard that there were influences on C from Algol68. That was a   
   language that used simple left-to-right type syntax, defaulted to   
   1-based indexing, was (largely) case-insensitive, and used := for   
   assignment and = for equality.   
      
   Each one of this is the exact opposite of C!   
      
   My language was genuinely inspired by Algol68, and as such, still has   
   those exact characteristics.   
      
   So I think I'd take such claims of C being inspired by or based on Algol   
   /or/ Algol68 with a pinch of salt.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca