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?

Flimzy
  • 12,896
  • 36
  • 95
  • 166
J. Calleja
  • 1,596
  • 1
  • 10
  • 14
  • 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 '11 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 09 '12 at 00: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 09 '12 at 22:31

1 Answers1

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.

pferor
  • 1,374
  • 9
  • 12