Released vibe.d 0.8.2
Sönke Ludwig
sludwig+d at outerproduct.org
Sun Dec 17 21:10:56 UTC 2017
Am 17.12.2017 um 21:56 schrieb bauss:
> On Sunday, 17 December 2017 at 20:55:15 UTC, bauss wrote:
>> private Nullable!string _path;
>
> Also does this really make sense?
>
> Why not just have it:
>
> private string _path;
>
> Then instead of:
> string path() @safe {
> if (_path.isNull) {
> _path = urlDecode(requestPath.toString);
> }
> return _path.get;
> }
>
> You could have:
> string path() @safe {
> if (!_path) {
> _path = urlDecode(requestPath.toString);
> }
> return _path;
> }
That would certainly be possible. Using a `Nullable` is mainly just more
explicit.
More information about the Digitalmars-d-announce
mailing list