|
|
|
|
|
by hoytech
3187 days ago
|
|
> For example, in languages like Perl, JavaScript, and CoffeeScript adding a string to a number is permissible (e.g., "5" + 2 yields "52"). The same operation yields 7 in Php. Such an operation is not permitted in languages such as Java and Python as they do not allow implicit conversion. Regarding Perl, the quoted statement is wrong: $ perl -E 'say "5" + 2'
7
Furthermore, this is not an implicit conversion. The + operator is an explicit numeric conversion. Here's a more detailed description:https://codespeaks.blogspot.ca/2007/09/ruby-and-python-overl... |
|