from Hacker News

C Right-Left Rule

by allending on 1/14/21, 1:22 AM with 2 comments

  • by Doxin on 1/15/21, 12:00 PM

    One of the best quality of life fixes D has over C (and by extensions C++) is getting rid of this complexity. In D you can simply go right-to-left. So instead of having

        char *str[10];
    
    you'd have

        char*[10] str;
    
    which when read right-to-left trivially results in "str is a array 10 of pointer to char"
  • by lupire on 1/14/21, 3:01 PM

    More readable version with ascok art, as the spiral rule:

    http://c-faq.com/decl/spiral.anderson.html