12

The C++ programming language has several types of constructors (functions invoked when an object is being created):

  • Default constructor: constructor por defecto.
  • Copy constructor: constructor de copia.

On the next revision of the language (C++11), there will be a new type of constructor called "move constructor". This constructor moves data from one temporal object to the new one.

However, I cannot find a proper translation, as constructor de movimiento or construcción de traslado sounds strange.

What would be an accurate way to translate this language element?

3
  • 4
    Although constructor de movimiento is "closer" to move constructor, constructor de traslado implies its meaning correctly. I did not post this as an answer because I am just giving my opinion on your current suggestions.
    – Jaime Soto
    Dec 12, 2011 at 23:31
  • Sorry for the off-topic but I'm into C++ and haven't heard of move-constructors, how is it different from a copy constructor? it deletes the original object or something?
    – Petruza
    Feb 9, 2012 at 0:22
  • It allows to transfer resources from the object being copied. It is normally invoked when copying temporal objects that are going to be destroyed afterwards.
    – J. Calleja
    Feb 9, 2012 at 22:31

1 Answer 1

10

It seems that «constructor de movimiento» is more used, even in Espawiki, where they say:

Constructor de copia y constructor de movimiento se definen por el compilador, a menos que uno de ellos sea definido explícitamente

«Constructor de traslado» is a very fair translation, and may be it's more appropriate, but it's not so used.

1
  • :Welcome to the site. An upvote to get you going.
    – Tom Au
    Dec 13, 2011 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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