News for hackers. Stuff that matters.
Re:Wren is a small, fast, class-based concurrent scripting l... by munificent on Monday August 29, 2022 @12:08PM (#32639872)
> I don't know why you have operator overloading at all.

Wren doesn't have "operator overloading". There is no separate feature in addition to the normal operator support that also lets you overload them. Wren just uses single dispatch for infix operators. Even the "built in" operator behavior like addition on numbers is simply pre-defined methods on the Number class. Like Smalltalk (which Wren is heavily inspired by), everything is just a method call and there is little "special" behavior for primitives.

Re:Wren is a small, fast, class-based concurrent scripting l... by randomswede on Tuesday August 30, 2022 @03:17AM (#32647535)
So if I understand this correctly, "a + b" is syntactic sugar for "a.+(b)" (modulo the exact name of the method)?
Re:Wren is a small, fast, class-based concurrent scripting l... by munificent on Tuesday August 30, 2022 @12:32PM (#32652276)
Yes, exactly. Basically everything is method calls.