On Friday, November 09, 2012 01:16:54 Mike van Dongen wrote: > Then I shall make it a struct. But is the following acceptable in > phobos? > > On Thursday, 8 November 2012 at 15:10:18 UTC, Mike van Dongen > > wrote: > > I agree with Jens Mueller on the fact that URI should be a > > struct instead of a class. But then I won't be able to return > > null anymore so I should throw an exception when an invalid URI > > has been passed to the constructor.s
Sure. I see no problem with throwing an exception when a constructor is given invalid data. std.datetime does that with its types. - Jonathan M Davis