Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Function binding#206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vplentinax merged 3 commits intojavascript-tutorial:masterfromvplentinax:binding
Jun 3, 2020
Merged

Function binding#206

vplentinax merged 3 commits intojavascript-tutorial:masterfromvplentinax:binding
Jun 3, 2020

Conversation

vplentinax
Copy link
Contributor

No description provided.

Copy link
Member

@joaquineliojoaquinelio left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Muy fluido y las palabras adecuadas, es bueno.

Para discusión. De varios comentarios que puse, cambié de opinión en el caso de conjugaciones, dejarlas en inglés sería delirante. Pero me mantengo en las definiciones js: bind, wrapper, en dejarlas en inglés o aclarar inmediatamente entre paréntesis. Que el lenguaje no distraiga. Por ej.: ver "contenedor" o "vincular" pasa desapercibido cuando en realidad se está refiriendo a algo muy específico.

@@ -0,0 +1,16 @@


1. Utilice una función de contenedor, una flecha para ser conciso:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Para glosario y discusión. Solo opino, me pliego a lo que decidan:

El original está feo. Y en español el sentido encima se desdibuja. Prefiérolo más específico:
"Use una función wrapper, de tipo arrow para ser conciso..."

Me pongo en lugar del que está aprendiendo, si usamos español es más difícil hacer la conexión a que es un tema ya estudiado, y el concepto es importante
wrapper, una función nueva que envuelve a otra existente para darle más... funcionalidad
arrow la forma abreviada: ( ) =>
no traducirlos hiere mi sentido del castellano PERO impactante más al que está aprendiendo
pues no tiene que aprender el doble, la def en inglés y en castellano, la literatura está llena de wrapper objects y tiene que fijarla.

En otro lado usé "envoltura" solamente para definirlo, contenedor creo que también está bien, pero si lo traducimos como definición (uf) deberíamos usar siempre lo mismo.

@@ -3,17 +3,17 @@ libs:

---

#Function binding
#Función vinculadora
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

sugiero siempre aclarar, para que se fije el tema.
Si buscara el tema, querría que bind (el nombre de la funcipn) o binding estuvieran en el título.

"Función bind (vincular)" o "Función vinculadora (bind)"

Glosario, discusión:
BINDING es otro concepto importante, no lo traduciría, pero es algo personal.
MDN aparece a veces como enlace y otras como vínculo, tanto sinónimo hace más arduo asimilarlo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

puede ser "Vinculación de Funciones" ??

Enlazar Funciones ??


##Solution 1:a wrapper
##Solución 1:un contenedor o envoltura
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

prefiero aclarar
un contenedor o envoltura (wrapper)
o
un wrapper (envoltura)


The result of `func.bind(context)`is a special function-like "exotic object", that is callable as function and transparently passes the call to`func`setting `this=context`.
El resultado de `func.bind(context)`es una función especial "objeto exótico" similar a una función regular, que se puede llamar como función y pasa la llamada de forma transparente a`func`estableciendo `this =context`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

fluidez
es un "objeto exótico", una función especial similar a una función regular que

```

In the line `(*)`we take the method`user.sayHi`and bind it to `user`.The`sayHi`is a "bound" function, that can be called alone or passed to `setTimeout` --doesn't matter, the context will be right.
En la línea `(*)`tomamos el método`user.sayHi`y lo vinculamos a `user`. `sayHi`es una función "enlazada", que se puede llamar sola o pasarse en `setTimeout` --no importa, el contexto será el correcto.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

( )sayHi es una función "enlazada", que pueda llamarse sola o pasarse ensetTimeout -- no importa, ( )


## Parcial sin contexto

¿Qué pasa si nos gustaría arreglar algunos argumentos, pero no el contexto `this`? Por ejemplo, para un método de objeto.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

incómodo
Y si quisiéramos arreglar algunos ( ) ?

arreglar ¿o fijar? Bien lo usaste así en otros lados. bind "fija" this ligando, pero también "arregla" la pérdida de this
no sé


Afortunadamente, se puede implementar fácilmente una función `parcial` para vincular solo argumentos.

Cómo esto:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Epa, se te coló un acento
Como esto:

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

Copy link
Member

@joaquineliojoaquinelio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Bind =está a vecs enlace, a veces vínculo.
subjuntivo en algun lado

Pero como antes, es mínimo y no me importa, hacé de cuenta que no te dije nada.
Approve

@vplentinaxvplentinax merged commit29507b0 intojavascript-tutorial:masterJun 3, 2020
@javascript-translate-bot

Thank you 💖 I updated the Progress Issue#17 🎉 🎉 🎉

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@joaquineliojoaquineliojoaquinelio approved these changes

@EzequielCasteEzequielCasteEzequielCaste approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@vplentinax@javascript-translate-bot@joaquinelio@EzequielCaste

[8]ページ先頭

©2009-2025 Movatter.jp