Hacker News new | ask | show | jobs
by amelius 3290 days ago
Offtopic/meta. I'm wondering about a technology that allows us to NOT re-implement an algorithm cookbook every time a new language shows up.
5 comments

I'm pretty sure any technology that could do that would also obviate programmers for most tasks, since it apparently understands how to program and learn new programming technologies well enough to implement algorithms both correctly and idiomatically based on a specification.
yea, I'm convinced it's possible to at least save a ton of work there. Probably not for optimized libs, but something is much better than nothing.

Rust though might be an example where such a thing wouldn't work (had it already existed), since the type system is legitimately different. But some things might work, and even a test suite you could develop against would be wonderful.

An ABI that could express sum types would be a huge step forwards for the computing world.

.net and the JVM sort of achieve this, but at the cost of going managed for everything. That's mostly fine (and possibly entirely fine, to be honest; very few people who think they need non-GC actually do), but there are still a few diehards who insist on non-GC, and Rust is pretty much the first good language to have that option in a comprehensive way.

Like dynamic libraries and FFI? Reimplementing algorithms is the only viable way to get them completely in a new language. It's also the only viable way to improve them.
But implementing algorithms is an enjoyable way of learning a language.
Ah yes, a unicorn.