Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Type inference has left academy and proliferated into mainstream languages for so many years that I almost forgot that it's a worth mentioning feature.

It’s not common in lower level languages without garbage collectors or languages focused on compilation speed.





The only popular language I can think of is C (prior to C23). If you want to include Fortran and Ada, that would be three, but these are all very old languages. All modern system languages have type deduction for variable declarations.

That's true if the only lower level languages one considers are C and assembler. Virtually every other language has moved way beyond that.

C++ added auto 14 years ago. Swift had it since day 1 back in 2014 if I remember right. What else is there?

C, Ada, Fortran, Pascal.

Compilation speed — OCaml, Go, D, C#, Java

“Low-level” languages — Rust, C++, D


I meant for focused on compilation speed to apply only to lower level languages. And when I say lower level I don’t really include D because it has a garbage collector (I know it’s optional but much of the standard library uses it I believe).

That a language has a garbage collector is completely orthogonal to whether it has type inference ... what the heck does it matter what "much of the standard library uses" to this issue? It's pure sophism. Even C now has type inference. The plain fact is that the claim is wrong.

The x axis is orthogonal to the y axis, so I can’t be interested in the area where x < 1 and y = 5?

> what the heck does it matter what "much of the standard library uses" to this issue?

It matters in that most people looking for a low level manually memory managed language won’t likely choose D, so for the purposes of “is this relatively novel among lower level, memory managed languages” D doesn’t fit my criteria.

> Even C now has type inference. The plain fact is that the claim is wrong.

Almost no one is using C23 yet.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: