Overload infix operators for table operations #42
Labels
experimental
Purely experimental ideas (for now)
feature
New feature or request
language
Language features/requests
Milestone
Set operations:
&
: intersection|
: union^
: symmetric difference-
: differenceList operations:
+
: append (concatenate?)This goes slightly against some of the original design philosophy of the language - data types can be very freely coerced, but the operations themselves have always been consistent in the types of values they yield. This is why a separate concatenation operator exists; so that
x + y
will always yield a numeric result andx # y
will always yield a string, regardless of whetherx
ory
is a number or a string. As opposed to overloading+
for string concatenation like many other languages.However, I feel OK with making exceptions when both operands are tables, since the result of any of these operations would otherwise be completely useless.
The text was updated successfully, but these errors were encountered: