-
Notifications
You must be signed in to change notification settings - Fork 49
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
Object references and copying #182
Object references and copying #182
Conversation
Please make the requested changes. After it, add a comment "/done". |
Co-authored-by: Andrea <45577511+longo-andrea@users.noreply.github.com>
Co-authored-by: Andrea <45577511+longo-andrea@users.noreply.github.com>
Co-authored-by: Andrea <45577511+longo-andrea@users.noreply.github.com>
/done |
Per me l'articolo va bene cosi, essendo che è alla sua prima traduzione non sarebbe male ricevere una seconda revisiona da un terza persona |
|
||
![](variable-contains-reference.svg) | ||
|
||
The object is stored somewhere in memory (at the right of the picture), while the `user` variable (at the left) has a "reference" to it. | ||
L'oggetto è archiviato da qualche parte nella memoria (sulla destra dell'immagine), mentre la variabile `user` (sulla sinistra) contiene il "riferimento" ad esso. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sulla [destra/sinistra] o a. "Sulla" non mi suona tanto bene...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ci ho pensato, ma qui ci si riferisce alla parte destra e sinistra dell'immagine e non a posizioni destra/sinistra rispetto all'immagine. Forse meglio usare "parte sinistra dell'immagine", oppure "a sinistra nell'immagine"
|
||
**When an object variable is copied, the reference is copied, but the object itself is not duplicated.** | ||
**Quando una variabile oggetto viene copiata, in realtà viene copiato il riferimento, ma l'oggetto in sé non viene duplicato.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sono un po' dubbioso su variabile oggetto. Penso sia piu' intuitivo nella versione inglese. In italiano, credo, potrebbe confondere (siccome abbiamo frasi come 'la legge oggetto di revisione', 'l'oggetto dei miei studi' ecc). Che ne dici di aggiungere delle virgolette? "variabile oggetto". Toglierei altresì il ma alla fine. Infine sono anche un po' dubbioso su in sé. E' corretto e suona bene, ma penso possa essere piu' intuitivo l'oggetto riferito (così utilizziamo anche la terminologia tecnica)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'accordo sulle virgolette, vedo di correggere tutte le istanze. Mentre per oggetto riferito mi sembra un po' troppo difficile, ricordiamoci che il tutorial nasce con l'intento di essere facile da leggere.
alert( a === b ); // true | ||
``` | ||
|
||
And here two independent objects are not equal, even though they look alike (both are empty): | ||
Qui, invece, due oggetti identici (entrambi vuoti) ma indipendenti, non soddisfano l'uguaglianza: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(opionione personalissima: aggiungerei una virgola dopo la parentesi). Non mi convince a pieno 'non soddisfano l'uguaglianza'... Non è molto chiaro. Funzionerebbe bene insieme a una traduzione di equality query; ad esempio (so che non suona bene, e' solo un esempio) interrogazione d'uguaglianza o non soddisfa i criteri d'uguaglianza del comparison operator ['==']. Che ne pensi?
Co-authored-by: Andrea <45577511+longo-andrea@users.noreply.github.com>
- Further arguments `src1, ..., srcN` (can be as many as needed) are source objects. | ||
- It copies the properties of all source objects `src1, ..., srcN` into the target `dest`. In other words, properties of all arguments starting from the second are copied into the first object. | ||
- The call returns `dest`. | ||
- Il primo argomento `dest` è l'oggetto di destinazione. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non mi convince moltissimo di destinazione. Sarebbe piu' chiaro, magari, se aggiungessimo 'delle proprieta' da copiare'. (Nemmeno i sinonimi mi convincono molto; dalla treccani: finalità, fine, meta, mira, obiettivo, scopo, target, traguardo; forse "l'oggetto di mira"?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
piu' letteralmente "target" sarebbe "obiettivo", ma in questo caso "destinazione" mi sembra renda meglio l'idea
``` | ||
|
||
If the copied property name already exists, it gets overwritten: | ||
Se una delle proprietà copiate è già presente nell'oggetto di destinazione, verrà sovrascritta. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vedi sopra (anche se, ti diro', qui e' intuitivo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ho suggerito un paio di modifiche. Tutte piccolezze, ottima traduzione e' stato un piacere leggerla!
Please make the requested changes. After it, add a comment "/done". |
/done |
/done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
No description provided.