Monday, November 17, 2014

Language philosophy

When designing a language, what goal should drive decisions about when the compiler should automatically apply certain transformations to code (such as adding typecasts) and when it should require that the programmer specify what is desired?

I would posit that a transform should be considered helpful if the meaning of the code with the transform applied would almost certainly match what the programmer intended.  It should be considered harmful in cases where it causes the compiler to accept code whose resultant meaning is likely to be something other than what was intended.


No comments:

Post a Comment