Hacker News new | past | comments | ask | show | jobs | submit login

> What language created in the last 5 years has a feature that wasn't originally discovered in the 80s or earlier?

I may be wrong, but isn't Rust's static lifetime analysis to avoid GC something novel?




Similar approaches do/did exist.

ATS uses theorem-proving, http://www.ats-lang.org/.

ParaSail uses regions, https://forge.open-do.org/plugins/moinmoin/parasail/

BitC used the type system, http://www.bitc-lang.org


None of these have the borrow check. From what I've heard the borrow check is impossible to encode generically in ATS (though maybe that has changed).


Objective-C has it.


Do you have any references? Searching for "objective c lifetime analysis" turned up articles for ARC, which is not exactly the same thing.


I meant ARC. I know it's not exactly the same, but it's similar enough when we're talking about novelty in programming languages.


ARC doesn't involve any sort of nontrivial lifetime analysis. The compiler simply inserts calls to retain and release at all of the same places where explicit calls to them (hopefully) were with manual reference counting. The only vaguely novel part of any of it was successfully migrating a language from manual to automatic reference counting.


Actually that's not entirely true. Arc inserts the calls first, but then does an elimination phase that can identify lifetimes beyond method boundaries and remove unnecessary calls.

It's not particularly complex, but the architecture is there for further enhancement of this phase as they build out the static analyzer.


That's nowhere near what the borrow check does. The borrow check is based on reasoning about ownership and inherited mutability, neither of which apply to Objective-C.




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

Search: