Ivar, I absolutely agree with you. This should be handled in a larger
scope. Do we have an issue for this yet?
Am Donnerstag, 3. Juli 2014 15:42:09 UTC+2 schrieb Ivar Nesje:
>
> I would strongly argue against
>
> +(a::String, b::String) == Error("Use * for string concatenation")
>
> We have plenty of cases where we want to give a more helpful
> `MethodError`. We should really create a simple system where you can get
> those hints printed in the REPL, without defining more methods.
>
> The display of MethodError is defined in
> https://github.com/JuliaLang/julia/blob/0df386db18dd186c7b0bffc74149fc6b0e51c67d/base/replutil.jl#L110
>
> and it would be easy to have a lookup table at the end of that function to
> see if one of the "banned" methods (with usefull, more concistent
> alternaltives) were called.
>
> Ivar
>
> kl. 15:11:43 UTC+2 torsdag 3. juli 2014 skrev Samuel Colvin følgende:
>>
>> Fundamentally I don't think it matters which mathematical operator we use
>> for an operation that's not strictly mathematical (or at least most users
>> don't think of as mathematical), everyone is quite happy with "x = 4" not
>> having it's rigorous meaning of "x == 4". As long as there's a compact and
>> clear way of doing string concatenation I'm happy.
>>
>> If most people want * that's fine especially as there would need to be a
>> very good reason to change it now.
>>
>> The point is that we should make it as easy as possible for people to
>> transition to Julia from other languages, and this is one potential
>> stumbling block.
>>
>> I agree with Tobias's suggestion of a REPL, IJulia only +(s1::String,
>> s2::String) that throws an informative error.
>>
>> For my part I've updated Julia By Example
>> <http://www.scolvin.com/juliabyexample/#Strings-Basics> to give an
>> example and a link to this discussion.
>>
>