News for hackers. Stuff that matters.
Re:Relive: 50 years of C, the good, the bad and the ugly by Someone on Friday December 30, 2022 @03:15PM (#34189503)
Where do you see dynamic memory allocations being needed in that example? I only see locals that a good compiler can fairly easily optimize away.

Also, there’s a simple bijection between expressions with operators and two-argument function calls:

  a + b * c
  +(a, *(b,c))
  plus(a, times(b,c))
Because of that, I don’t understand why operator overloading should give better optimization opportunities than function calls.
Re:Relive: 50 years of C, the good, the bad and the ugly by menaerus on Saturday December 31, 2022 @05:02AM (#34195089)
Unless you're talking about some theoretical promise, C++ promise implementation imposes dynamic allocation.