Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WeakMap and WeakSet #176

Merged
merged 12 commits into from Jun 15, 2020
Merged

WeakMap and WeakSet #176

merged 12 commits into from Jun 15, 2020

Conversation

vplentinax
Copy link
Contributor

No description provided.

Copy link
Contributor

@cortizg cortizg left a comment

Choose a reason for hiding this comment

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

discrepo en dejar Array en las traducciones, este review lo dejo como comentario, pero hay unas traducciones pequeñas que se pasaron por alto como "Like this"

Otra solución diferente podría ser agregar una propiedad como `message.isRead = true` a un mensaje después de leerlo. Como los objetos de mensajes son administrados por otro código, generalmente se desaconseja, pero podemos usar una propiedad simbólica para evitar conflictos.

Like this:
```js
Copy link
Contributor

Choose a reason for hiding this comment

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

Como esto:


---

# Almacenar banderas "no leídas"
Copy link
Contributor

Choose a reason for hiding this comment

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

Mencionaba Joaquin que banderas se deja como flags, tal como hace MDN

# Almacenar banderas "no leídas"

Hay un array de mensajes:

Copy link
Contributor

Choose a reason for hiding this comment

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

array es arreglo, incluso MDN dice arreglo


# Almacenar fechas de lectura

Hay un array semejante al de la actividad anterior [previous task](info:task/recipients-read). La sitación es similar:
Copy link
Contributor

Choose a reason for hiding this comment

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


En la tarea anterior solo necesitábamos almacenar el hecho de "sí / no". Ahora necesitamos almacenar la fecha, y solo debe permanecer en la memoria hasta que el mensaje sea recolectado como basura.

P.D Las fechas se pueden almacenar como objetos de la clase incorporada `Fecha`, que cubriremos más adelante.
Copy link
Contributor

Choose a reason for hiding this comment

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

la clase incorporada (builtin) se llama Date: OJO


Por lo general, las propiedades de un objeto o elementos de un array u otra estructura de datos se consideran accesibles y se mantienen en la memoria mientras esa estructura de datos permanezca en la memoria.

Por ejemplo, si colocamos un objeto en un array, mientras el array esté vivo, el objeto también estará vivo, incluso si no hay otras referencias a él.
Copy link
Contributor

Choose a reason for hiding this comment

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

john = null; // sobrescribe la referencia

*!*
// John se almacena dentro del array, por lo que no será recolectado por el recolector de basura
Copy link
Contributor

Choose a reason for hiding this comment

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

busqueda y reemplazo con editor de texto array por arreglo

1-js/05-data-types/weakmap-weakset/article.md Show resolved Hide resolved
1-js/05-data-types/weakmap-weakset/article.md Show resolved Hide resolved
Copy link
Contributor

@cortizg cortizg left a comment

Choose a reason for hiding this comment

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

traducciones que pasaron por alto y un typo

1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
@javascript-translate-bot

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

vplentinax and others added 4 commits June 10, 2020 19:28
Co-authored-by: Carlos Ortiz Gutiérrez <56600925+cortizg@users.noreply.github.com>
Co-authored-by: Carlos Ortiz Gutiérrez <56600925+cortizg@users.noreply.github.com>
…k.md

Co-authored-by: Carlos Ortiz Gutiérrez <56600925+cortizg@users.noreply.github.com>
Co-authored-by: Carlos Ortiz Gutiérrez <56600925+cortizg@users.noreply.github.com>
Copy link
Member

@joaquinelio joaquinelio left a comment

Choose a reason for hiding this comment

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

Un par de cositas tipo "suggest" nomás.
Abandono la pelea de glosario array. Cambialo o no, then merge sin asco.

1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
1-js/05-data-types/weakmap-weakset/article.md Outdated Show resolved Hide resolved
EzequielCaste and others added 7 commits June 15, 2020 18:24
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
@EzequielCaste EzequielCaste merged commit a4edb73 into javascript-tutorial:master Jun 15, 2020
@javascript-translate-bot

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants