0

So I have something called node.

And I have something that wraps it nodeWrapper. But it feels so cumbersome.

Is there a better word? I feel there should be some word, like archNode, superNode, but I don't like these either. It would be great if someone can suggest the right prefix with latin or greek roots. Thanks!

closed as off-topic by FumbleFingers, Michael Harvey, Eddie Kal, Andrew, Varun Nair Dec 3 '18 at 7:15

  • This question does not appear to be about learning the English language within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Greek, eh? ...epiNode? – Luke Sawczak Dec 2 '18 at 13:39
  • Yes, it feels weird too :) I made some research while waiting for the answers and I think there is no good alternative to wrapper/wrapped... But I still hope. – Nurbol Alpysbayev Dec 2 '18 at 13:40
  • What is it that you need that nodeWrapper class for, anyway? Understanding its purpose would probably help in finding appropriate names for it (my answer below notwithstanding). – Ilmari Karonen Dec 2 '18 at 13:43
  • @IlmariKaronen Hey I has wrote the comment just about that under your answer. – Nurbol Alpysbayev Dec 2 '18 at 13:46
  • 5
    I'm voting to close this question as off-topic because the established domain-specific term is wrapper (which the OP already knows), and it's inappropriate for ELL to be advising people which "non-standard" term they might use instead. – FumbleFingers Dec 2 '18 at 13:56
1

I think you will find that wrapper node and container node are both widely used. But which one is "better" to use is really not a question suitable for this site as it is not an "English language" question but a domain-specific question.

That said, I happen to think "container" is a better metaphor than "wrapper".

P.S. If the object contains one or more objects, I'd call it a container. If it provides an interface to a single object only, I'd call it a wrapper.

  • The term container fits my case perfectly! And it is used widely in Laravel framework and in DevOPS (but I have forgot about this fact). – Nurbol Alpysbayev Dec 2 '18 at 14:19
  • wrapping and containing are completely different. Best not to mess with existing programming language. – Lambie Dec 2 '18 at 15:26
  • 1
    @Lambie: It depends on what the outer object does and on the number of inner objects. – Tᴚoɯɐuo Dec 2 '18 at 15:35
4

"Wrapper" is the established term for what you seem to be describing, so trying to find a different word to describe the same thing is likely counterproductive, and only serves to confuse and to hinder communication.

That said, depending on the details of the situation, your wrapper class could perhaps be more specifically described as an "adapter" or a "proxy", or one of various other similar things like a "decorator" or a "bridge" or a "facade". But I would not recommend using any of those terms unless you're sure that your class really matches the established definition of one of those design patterns. And, in any case, none of those words are significantly less cumbersome than "wrapper".

  • Great answer! Hey, I see that you are something of SDE as well, can you suggest me the most appropriate option in your opinion for this case: I have an object of some class/interface. I need to associate some data to it, but I don't want to change it's interface (i.e. add properties). So I make another wrapping object for it, where I place the additional data. Is wrapper the best choice? – Nurbol Alpysbayev Dec 2 '18 at 13:45
  • @NurbolAlpysbayev: It could be. You might be specifically looking for a decorator, although it's hard to tell for sure just from that generic description. In any case, I feel like that question is probably better suited for Stack Overflow, or perhaps even better for Software Engineering. – Ilmari Karonen Dec 2 '18 at 13:49
  • Yes, I has been doubting whether it is an appropriate place to ask this question. Regarding decorator, isn't it applied to functions and not to objects/data structures? – Nurbol Alpysbayev Dec 2 '18 at 13:51
  • @NurbolAlpysbayev: Not in the sense described e.g. on the Wikipedia page I linked to. You might be confusing it e.g. with function decorators in Python. – Ilmari Karonen Dec 2 '18 at 13:52
  • JS uses the term decorator for functions as well. Thank you very much! – Nurbol Alpysbayev Dec 2 '18 at 13:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.