News for hackers. Stuff that matters.
Re:Why Dart is not the language of the future. by msy on Tuesday October 11, 2011 @12:22PM (#3099177)
Just use inline implicit conversion: "r #{5+3/2}"
Re:Why Dart is not the language of the future. by jamesbritt on Tuesday October 11, 2011 @04:09PM (#3100102)
It's a lot more typing. :)

If one really wanted that kind of behavior (and not getting errors when trying to add strings and number) you could make it so:

    class String
      def +(o)
        warn "You are adding a #{o.class} to a string." unless o.is_a? String
        "#{self}#{o}"
      end
    end
for example.

Whether this leads to other issues is left as an exercise for the reader and whomever ends up maintaining the reader's code.