Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
"Casted" is not a contemporary English word. The past tense is "cast". However, "casted' is used in method names for the Typed Data API (and therefore documentation and parameter names as well).
Proposed resolution
- Provide new methods for misspelled methods, e.g.
PrimitiveInterface::getCastValue()
and deprecate the old ones. - Rename internal parameters etc. appropriately.
- Update documentation to refer to "cast" and "uncast" values rather than "casted" and "non-casted".
Remaining tasks
TBD
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Comments
Comment #2
xjmThe final patch will also need to address occurrences from #2751325: All serialized values are strings, should be integers/booleans when appropriate.
Comment #3
mpdonadioDo canonical development references also agree with this usage? Unfortunately, none of the books within arms reach that I would consider as such talk about type-casting. I have several at home, though, that likely do.
Comment #4
xjm"Casted" is not a contemporary PHP word, either.
http://php.net/manual/en/language.types.type-juggling.php
(Emphasis added.)
Edit: The only uses of "casted" I could find on php.net were in comments. :)
Comment #5
xjmComment #6
xjmAlso:
Comment #7
xjmComment #8
alexpottIt's in Symfony https://github.com/symfony/symfony/search?utf8=%E2%9C%93&q=casted and PHP https://github.com/php/php-src/search?utf8=%E2%9C%93&q=casted codebases.
Comment #9
mpdonadioI have a lot of books on languages and type theory (a lot, as in, I have a problem). K&R 1 and 2 are the only that mention "cast", and only use it as a noun; coercion is the verb form. I have a message into one of my computer language research friends. And my comment wasn't to bikeshed this, just to get it correct if we are trying to correct an improper usage.
Comment #22
quietone CreditAttribution: quietone at PreviousNext commented