News for hackers. Stuff that matters.
Re:TypeScript 7 by delta_p_delta_x on Wednesday July 08, 2026 @04:57PM (#48837313)
This is called automatic type inference, and it is a big feature of functional programming languages, many of which are very strongly typed. Also, for the record, C++ gained type inference about a decade and a half ago.

In C++ one can declare a completely typeless lambda:

  auto callsAdd = [](auto x, auto y) { return x + y; }
And the programmer need never specify what x and y are, as long as there exists a reachable declaration of operator+ that has two arguments that accepts whatever x and y resolve to, at instantiation time (which is compile time).

There are no comments on this comment yet.