Top "Type-coercion" questions

In weakly typed languages, type coercion is where a data type is converted by the interpreter from one type to another (such as a string to an integer).

Create String list in Groovy

The following code in Groovy adds GStrings to the list: List<String> args = [ 'cmd', "-Dopt=${value}" ] When I …

list groovy gstring type-coercion
In Ruby, how does coerce() actually work?

It is said that when we have a class Point and knows how to perform point * 3 like the following: class …

ruby coercion coerce type-coercion
How does PHP compare strings with comparison operators?

I'm comparing strings with comparison operators. I needs some short of explanations for the below two comparisons and their result. …

php string compare operators type-coercion
What is the difference between autoboxing and coercion?

I program in Java, C and Python. The rule for automatic coercions among arithmetic types have been augmented to handle …

java c autoboxing coercion type-coercion