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

If we struggle to reason about code we've written, perhaps we weren't so good at writing code?



Not quite. It also means that our languages are inadequate for the task.

As a rough analogy, consider how ancient philosophers tried to reason about natural language explainations (as a vehicle to reason about the world). This led to the development of formal languages, especially in mathematics, but also e.g. in laws (both have lots of clearly defined terms in them that try to make up for the ambiguities of natural language).

This is exactly what I like about languages like Haskell, where you can reason realtively easily about code (although it's far from perfect). Or OCaml, where in addition you can reason about the performance (although not perfectly, due to garbage collection etc.). Or Rust, where in addition the compiler helps you to reason clearly about memory usage and aliasing.

This is all far from perfect, but my point is that improving languages (and actually _using_ these good languages!) is as important as writing good code in the first place.


Sorry, accidental down vote. Great point.




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

Search: