Kiuhnm
2021-06-09 23:04:10 UTC
In un thread precedente si è parlato di come molti informatici usino
"ritornare" come verbo transitivo quando si parla di funzioni:
una funzione ritorna un valore al chiamante
Si è sostenuto che dipenda dal fatto che si lascino influenzare
dall'inglese, infatti in inglese si dice:
a function returns a value (back) to the caller
Vorrei però segnalare un cambio di transitività che ho appena notato in
inglese.
Gli elementi di una pagina web ricevono l'input da tastiera solo quando
hanno il focus. Per es. per digitare qualcosa in un campo che non abbia
già il focus, gli si clicca sopra.
In inglese il verbo "to focus" vuole la preposizione "on":
to focus on something
to focus something on something else
Si può usare anche "set focus":
to set focus on something
Notate che "to focus A" non significa focalizzarsi su A, ma significa
"focalizzare A" ed è di solito seguito da "on B", cioè "su B".
Guardate ora cosa dice la documentazione MS riguardo alla funzione
"focus" usata per "dare focus" a un elemento di una pagina web[1]:
"The HTMLElement.focus() method sets focus on the specified element,
if it can be *focused*. The *focused* element is the element which will
receive keyboard and similar events by default.
[..]
A value of false for preventScroll (the default) means that the browser
will scroll the element into view after *focusing it*."
La specificazione ufficiale, è più esplicita[2]:
"When an element is the DOM anchor of a *focusable* area of the
currently *focused* area of a top-level browsing context, it is *focused*."
Penso che un inglese senza conoscenze informatiche resterebbe allibito
nel leggere simili espressioni. Eppure un informatico non batte ciglio
perché capisce perfettamente i motivi che portano a tali scelte.
[1]
https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus
[2] https://html.spec.whatwg.org/multipage/interaction.html#focused
"ritornare" come verbo transitivo quando si parla di funzioni:
una funzione ritorna un valore al chiamante
Si è sostenuto che dipenda dal fatto che si lascino influenzare
dall'inglese, infatti in inglese si dice:
a function returns a value (back) to the caller
Vorrei però segnalare un cambio di transitività che ho appena notato in
inglese.
Gli elementi di una pagina web ricevono l'input da tastiera solo quando
hanno il focus. Per es. per digitare qualcosa in un campo che non abbia
già il focus, gli si clicca sopra.
In inglese il verbo "to focus" vuole la preposizione "on":
to focus on something
to focus something on something else
Si può usare anche "set focus":
to set focus on something
Notate che "to focus A" non significa focalizzarsi su A, ma significa
"focalizzare A" ed è di solito seguito da "on B", cioè "su B".
Guardate ora cosa dice la documentazione MS riguardo alla funzione
"focus" usata per "dare focus" a un elemento di una pagina web[1]:
"The HTMLElement.focus() method sets focus on the specified element,
if it can be *focused*. The *focused* element is the element which will
receive keyboard and similar events by default.
[..]
A value of false for preventScroll (the default) means that the browser
will scroll the element into view after *focusing it*."
La specificazione ufficiale, è più esplicita[2]:
"When an element is the DOM anchor of a *focusable* area of the
currently *focused* area of a top-level browsing context, it is *focused*."
Penso che un inglese senza conoscenze informatiche resterebbe allibito
nel leggere simili espressioni. Eppure un informatico non batte ciglio
perché capisce perfettamente i motivi che portano a tali scelte.
[1]
https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus
[2] https://html.spec.whatwg.org/multipage/interaction.html#focused
--
Kiuhnm
False friend del giorno: "to make redundant".
Non significa dare lavoro ad amici e familiari inserendoli
in ogni dove, bensì "licenziare".
Kiuhnm
False friend del giorno: "to make redundant".
Non significa dare lavoro ad amici e familiari inserendoli
in ogni dove, bensì "licenziare".