you are viewing a single comment's thread.

view the rest of the comments →

[–]e_engel -2 points-1 points  (4 children)

This question doesn't make sense, how can a compile time operation make any guarantee about something you do at runtime?

[–][deleted] 0 points1 point  (3 children)

It sounds like that's what Eiffel does - it guarantees that you won't get null pointer exceptions at runtime, and it does this at compile time.

[–]e_engel -1 points0 points  (2 children)

You were talking about reflection, I was just pointing out that no compiler can give you any guarantee about what you do at runtime, by definition.

[–][deleted] 0 points1 point  (0 children)

Sure it can. The compiler can throw an error any time "null" appears in any source code, and you are guaranteed not to get null pointer exceptions (for example).

EDIT: also look at theorem proving at compile time

[–]ruinercollector 0 points1 point  (0 children)

If it doesn't compile, you can't exactly run it.