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

I'm a big believer in RYINTBDIMOTB (Repeating Yourself Is Not The Big Deal It's Made Out To Be). In a safety-oriented language, checking for consistency in all of the repeated instances of a thing is one form of low-hanging-fruit safety check.

If you're restricting yourself to access types you have good memory safety. Access types cannot be aliased unless declared so, and are subject to accessibility checks to verify that they are "live". Unsafe stuff in Ada must be used explicitly; you cannot, in general, accidentally the whole stack or heap unless you are using a pathological coding style.



> checking for consistency in all of the repeated instances of a thing is one form of low-hanging-fruit safety check.

I shouldn't have to make such checks in the first place. Not making a mistake in the first place is preferable to detecting it later on.


> Not making a mistake in the first place is preferable to detecting it later on.

Not trying to detect a mistake is a great way to form the impression that you're not making them in the first place.


Perhaps I was not clear. A preferable alternative to detecting mistakes is to ensure that they are impossible to make in the first place.


If you're a human, you make mistakes. It's what you do.

Having the compiler check your work for mistakes and flagging them up early is better than letting them slide.


>If you're a human, you make mistakes.

Unless you can design your compiler to make a class of mistake impossible, as we were discussing.


We should also consider the mistakes of others and runtime errors.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: