Issue #6784 has been updated by Daniel Pittman.

Status changed from Needs Decision to Rejected

The renaming isn't all that beneficial, and we have shipped the current 
version.  The cost of change is higher than any benefit this might bring.

(As an aside, the return value is useful, but whatever. ;)
----------------------------------------
Bug #6784: Puppet::Interface.new should be #interface
https://projects.puppetlabs.com/issues/6784

Author: Pieter van de Bruggen
Status: Rejected
Priority: Normal
Assignee: Nigel Kersten
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


The code currently implements Interface creation as:

    Puppet::Interface.new :name do ... end

There are implicit behaviors that create entries in the namespace for the newly 
created Interface, and the instance returned by `Puppet::Interface.new` is not 
actually useful.  While this makes sense from an (English) grammatical 
perspective, `[Class].new` is expressly intended to create a new instance of 
something, to be stored in a variable and manipulated later.

Since `Puppet::Interface.new` is not actually creating an immediately useful 
instance, it is likely more correct to say something like:

    Puppet::Interface.describe :name do ... end

If `Puppet::Interface` is not a `Class`, but a `Module`, then this interface 
becomes feasible:

    include Puppet::Interface

    describe :name do ... end

Since what's being `describe`d could be considered ambiguous, and the intent of 
the method is to set up a new interface:

    include Puppet::Interface

    interface :name do ... end

seems to make the most sense.

In combination with issue #6783, we could automatically include 
`Puppet::Interface` into the sandbox so that interface declaration is simply:

    interface :name do ... end

Note that this does not introduce any change in semantics from 
`Puppet::Interface.new`.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to