|
|
|
|
|
by kazinator
2206 days ago
|
|
Lisp certainly performs some implicit conversions in numeric computing. > (+ 1 1/10 3.0)
4.1
In this example, since + is a function, it's part of its semantics.There would be a lot of verbiage if arguments had to be coerced to all be of the same type. In addition to numeric examples, there are situations where Lisp is forgiving/flexible. For instance in most cases, a symbol can be used in place of a function object. The symbol is resolved to a function through its function binding. That can be regarded as an implicit conversion, or alternatively as polymorphism. Yet another example is that Common Lisp allows some string operations on symbols. (string= 'abc "ABC") -> T
No conversion ever takes place in the evaluation, as far as I know, or the passage of a value (e.g. from a function argument expression into the argument). All these kinds of things happen inside specific functions according to their respective rules. |
|