Is agregar or añadir (or something else) more correct when describing computer programming actions, for example when adding a string to an array?


Is that:

Agregar la cadena a la matriz


Añadir la cadena a la matriz

What about when describing adding a new function to a class?

Agregue la nueva función a la clase Foo

Final situation: "self must be added as the first parameter"

self debe añadirse como el primer parámetro


As a developer myself, I tend to use añadir more frequently than agregar, mostly because the latter is related to "aggregation" which is also a programming concept and in some contexts might need some disambiguation; although both are generally valid.

If you want to be more specific, you can use concatenar instead when talking about appending to a string.

The only exception would be when talking about arithmetic addition, where one should almost always use sumar.

  • 1
    Good answer. // I like concatenar because it has only one meaning. But I don't know what people say in practice, since I did not learn to program until after leaving Latin America. May 13 '17 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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