Most software are outdated after a couple of years.
But I still think that accessors are a must if you know that the software will be immortal (like Internet banking applications)
Most software are outdated after a couple of years.
But I still think that accessors are a must if you know that the software will be immortal (like Internet banking applications)
I can't say I know the average shelf life of a software component in various languages, but I can say that at least things like Java have managed to justify their use of accessors by that metric. Maybe the focus should be on writing less throwaway code than deciding whether to "invest" a few extra minutes or not on accessors.
tl;dr; Usually enterprise Java applications does have long "service life".
You'd be surprised. Tons of code runs in production, even in the latest of shiny systems, that was written 10 and 20 and 30 years ago -- either in whole or in parts, refactored etc.
From 1986's NeXT OS that is now OS X Lion and iOS 5, to Bill Joy's TCP/IP, to Emacs.
And tons of enterprise/banking/financial/military systems use ancient code, even 70's COBOL...