> On 17 May 2017, at 13:29, K K Subbu <kksubbu...@gmail.com> wrote: > > Hi, > > STCommandLineHandler>>#end is defined as: > --- > | quit | > quit := self commandLine hasOption: 'quit'. > (self commandLine hasOption: 'save') > ifTrue: [ Smalltalk snapshot: true andQuit: quit ]. > quit > ifTrue: [ self exitSuccess ]. > --- > Can this be simplified to: > > ^Smalltalk snapshot: (self hasOption: 'save') > andQuit: (self hasOption: 'quit') > > Is it necessary to call exitSuccess when only '--quit' is given?
Yes. #exitSuccess does a bit more: 1. return an exit code to the command line 2. print a message 3. check if the session has changed 4. allows for overriding and special handling of the Exit exception. You should not assume that nobody needs that :) Cheers, Max > > Regards .. Subbu >