6
\$\begingroup\$

Protocols are a well defined theoretical concept in computing, and in other fields too. Protocols are an established system for communicating between two entities. HTTP, TCP, and UDP are well-know protocols that even have Protocol as part of the name. The concept has a well populated tag on Stack Overflow - Protocols. Sharing a common meaning between Code Review and Stack Overflow is generally useful. Contradicting Stack Overflow tag meanings is generally very confusing.

This tag was recently introduced as a tag on a Swift question. Protocols are a language structure that are similar to a class protoype, or interface, in other languages.

This meaning given to the Code Review Protocol tag is potentially confusing.

Two questions/concerns:

  1. The current tag is . Plural tags are unfriendly. Should it be the singular ?

  2. Wikipedia links both Interface and Protocol as synonyms, with Protocol being the main name, and Interface being the synonym. Given that Code Review already has the Interface tag, and that Protocol is overloaded already, does it makes sense to use the language-independent tag for those uses of Protocol where the meaning is related to method prototypes, and to leave for communication systems?

\$\endgroup\$
4
\$\begingroup\$

I suggest renaming to , and a synonym for harmonization with Stack Overflow.

To cover the idea of ObjC / Swift protocols and Java interfaces, I think that the existing would be sufficient to convey the idea that the question has something to do with object-oriented design. I doubt that anyone would want to follow something as specific as a [swift-protocol] tag.

\$\endgroup\$
  • \$\begingroup\$ But do we want a swift-protocol, and objective-c-protocol, and so on and so forth for any other language for which the term is "protocol" rather than "interface"? \$\endgroup\$ – nhgrif Dec 2 '14 at 22:58
  • \$\begingroup\$ I have amended my proposal to just use oop. \$\endgroup\$ – 200_success Dec 2 '14 at 23:14
2
\$\begingroup\$

I'm fine with singularizing into .

With that said, I'm not fine using the "language-independent" tag .

The term protocol, as I've used it in tagging the question that created this tag is used to refer to these sort of prototypes. The problem is, in the two languages I know of that use the term protocol, these languages also have the term interface, which means something different.

A question tagged , I would assume, would be a question about class interfaces, whereas a question tagged would be a question about protocols (which are similar to Interfaces in other languages such as Java).

If it weren't for the fact that "interface" has its own meaning in these languages, I might be more okay using to mean "protocol".

This tag here is more equivalent to the tag on Stack Overflow. (objective-c-protocol) This tag also predates Swift, otherwise it might have a different name.


Addendum:

Note, that something like this is extraordinarily common in Objective-C:

@protocol FooProtocol
@required - (void)fooMethod;
@end

@interface FooClass : NSObject
@property (weak) id<FooProtocol> fooProperty;
@end

Where FooProtocol is a protocol (again, similar to a Java interface) and FooClass is a class, and fooProperty is a property of FooClass objects, the type of which is any object, so long as it conforms to FooProtocol.

Notice the use of the keyword @interface only a few lines from the use of the keyword @protocol.

\$\endgroup\$
  • 1
    \$\begingroup\$ Having a [protocol] tag whose meaning switches between "network protocol" when accompanied by networking and "guaranteed set of method signatures" when accompanied by objective-c is not right. I take it as a sign that [protocol] is too ambiguous to exist at all. \$\endgroup\$ – 200_success Dec 4 '14 at 8:24
  • \$\begingroup\$ @200_success that's not really what I'm recommending. \$\endgroup\$ – nhgrif Dec 4 '14 at 11:29
-1
\$\begingroup\$

I agree with making singular or even .

Rather than or , what about saying ? That would cover every language and not be easily confused with a networking protocol. My problem with OOP is that it doesn't scream protocol to me and that term apparently has a specific meaning in the relevant languages. A tag name that includes the word protocol is going to be easier to find in those cases.

This way someone wants to tag a question protocol and gets feedback suggesting and . I think that if they want networking, it will be really obvious. If they want Objective-C or Swift protocols, it's a little less obvious, but still more obvious than OOP. It won't quite match the Stack Overflow split, but I think that it is better not to tie it to just one language. Consistency is good, but we shouldn't follow them in a mistake purely to maintain consistency.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .