News for hackers. Stuff that matters.
Re:C’s Biggest Mistake (2009) by saagarjha on Sunday September 13, 2020 @05:53AM (#24459710)
This would require storing type information in a symbol, would it not? Either via mangling or some other method.
Re:C’s Biggest Mistake (2009) by knaq on Sunday September 13, 2020 @06:02AM (#24459749)
Yes. I proposed a method without mangling, but I suppose there isn't any reason why C couldn't use mangled names.

It also isn't a requirement that C++ use mangled names. Other ways of carrying the type information are possible. I like the idea of a reference to DWARF debug info, which C++ is already using to support stack unwinding for exceptions.

Re:C’s Biggest Mistake (2009) by account42 on Tuesday September 15, 2020 @05:38AM (#24479422)
> It also isn't a requirement that C++ use mangled names.

Overloading requires the type information to be part of the symbol "name" (ie, whatever is used for symbol lookup and linking) wether that is a mangled string or more complex data structure.