#2622 Depend ctor

SlimerDude Thu 27 Jul 2017

Just to say it'd be handy if Depend had a convenience ctor of:

new make(Str name, Version version)

or even:

new make(Str name, Version v1, Version? v2 := null, Version? v3 := null)

if you wanted to support multiple versions.

More often than not, when I want to create a Depend I already have the name and version objects. It's then a pain (and waste of processing) to create a string just to pass to Depend.fromStr().

brian Wed 23 Aug 2017

I am not sure about that one because you'd have to figure out how to get plus true/false in there into the API, although slightly more efficient it probably more confusing than just turning what you want into a string:

Depend("$name $version")
Depend("$name $version+")
Depend("$name $version1, $version2")
etc

Login or Signup to reply.