Hacker News new | ask | show | jobs
by akiarie 808 days ago
I like that, "The Mother of Modern Programming Languages". Perhaps it is better to call C the Latin of programming.

> How anyone can think pointer arithmetic is elegant is beyond me. Especially when the title mentions a language with algebraic data types and higher order functions. Or even just RAII.

I have nothing against algebraic data types. They're great. With respect to elegance, I will refer to nothing more than this (from K&R):

  /* strcmp: return <0 if s<t, 0 if s==t, >0 if s>t */
  int strcmp(char *s, char *t)
  {
          for ( ; *s == *t; s++, t++)
                  if (*s == '\0')
                          return 0;
          return *s - *t;
  }
I challenge you to provide a more elegant function with the same specification.