Re: Discuss changing the behaviour of append()
- Posted by mindwalker Jun 11, 2014
- 4738 views
One of the better techniques in designing applications, is to always provide validity checking on data that comes from outside the program, as opposed to data that is generated by the program. It would be better, IMO, to validate the text file data before using that data. The application then can either fail gracefully or come to some other arrangement.
Agreed.
Thus from my point of view, I see that my suggested change would not break working programs but would break non-working programs
Agreed in full!
By the way, data that is generated by an application should be subject to 'logic' testing during the testing/debugging stages of an application's development, and not during live run times.
This is a sound principle, but in practice it's hard to think of/catch everything. So those 3 times when there was bad data (and the application crashed?) could easily have been from causes that somehow got missed during the original testing/debugging states, or an "impossible situation" that happened anyways. It happens. Hence the reason to keep validity checking code durning live run times.
I think we can all agree that relying on append() to crash your program for validity checking purposes is a silly way to do things.
All of my original post was a hypothetical scenario with hyperbola added to indicate the satifactory performace of the product in meeting the users needs. Three failures in 5 years indicating the source file generation works correctly except during sudden power outages or network failures or such.
That said in the real world people do make these choices; hobby programmers, small businesses where the owner is the programmer, etc. It may be clever of you to label their program as "not working" just because it doesn't meet your better programming standards. But for them it meets the need and didn't require a ton of programming. In fact that is one of the strengths of Euphoria. Someone doesn't need to be a professional programmer with knowledge of all the best programming standards to fashion a program that as far as they are concerned works.

