in reply to Determining what new and init methods do
I would expect new to create a new object representing a file. I wouldn't expect the creation of a file when calling new though. Maybe createFile and loadFile both call new with the file name, create would just create it first. Then you have the common code in new, and the specific codes for createing or loading in seperate methods. You could then also have a createOrLoadFile that does both and your code doesn't even have to care if the file exists yet or not.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Determining what new and init methods do
by talexb (Chancellor) on Oct 26, 2007 at 15:45 UTC |