[erlang-patches] Scan "=<<" as something useful

Loïc Hoguin essen@REDACTED
Mon Apr 29 13:59:11 CEST 2013


I don't encounter it often anymore because I got used to it being 
broken, and put an extra space, but that doesn't mean it shouldn't be 
fixed, it would relieve the many new developers from making the mistake 
and then losing time asking about it.

On 04/29/2013 06:29 AM, Robert Virding wrote:
> Well, I can honestly say I never encounter it so that doesn't prove anything either way. Just put spaces around = and you will get easier to read code as well. IMAO
>
> Robert
>
> ----- Original Message -----
>> From: "Anthony Ramine" <n.oxyde@REDACTED>
>> To: mc@REDACTED
>> Cc: "Robert Virding" <robert.virding@REDACTED>, "Erlang Patches" <erlang-patches@REDACTED>
>> Sent: Sunday, 28 April, 2013 4:59:06 AM
>> Subject: Re: [erlang-patches] Scan "=<<" as something useful
>>
>> Hello Pedram,
>>
>> I will also add that most often I get hit by that bug in the shell,
>> not in compiled modules. It is quite annoying to encounter an
>> avoidable syntax error in the REPL while testing new things and
>> doing "Bin=<<>>".
>>
>> Regards
>>
>> --
>> Anthony Ramine
>>
>> Le 28 avr. 2013 à 05:36, Pedram Nimreezi a écrit :
>>
>>> While I completely agree with this sentiment- I don't agree the
>>> good outweighs the bad here..
>>>
>>> - I think it is a real language wart.
>>> - I think it is inconsistent with other types.
>>> - I think time spent looking for this error is wasted time.
>>> - I believe that at best this should warn and not error.
>>>
>>> Lastly, I consider this a byproduct of incomplete scanning and
>>> should be corrected not celebrated..
>>>
>>>
>>> On Sat, Apr 27, 2013 at 11:09 PM, Robert Virding
>>> <robert.virding@REDACTED> wrote:
>>> I don't want to be a wet blanket but I feel that in general having
>>> blanks between operators is a Good Thing which improves
>>> legibility. So I don't really like a syntax change which supports
>>> not having blanks between operators.
>>>
>>> Robert
>>>
>>> From: "Pedram Nimreezi" <mc@REDACTED>
>>> To: "Sean Cribbs" <sean@REDACTED>
>>> Cc: "Erlang Patches" <erlang-patches@REDACTED>
>>> Sent: Monday, 22 April, 2013 11:06:24 AM
>>> Subject: Re: [erlang-patches] Scan "=<<" as something useful
>>>
>>>
>>> Good erlang wart to remove...  +1
>>>
>>>
>>> On Mon, Apr 22, 2013 at 12:21 AM, Sean Cribbs <sean@REDACTED>
>>> wrote:
>>> I can't count how many times this has bitten me, kudos.
>>>
>>>
>>> On Sun, Apr 21, 2013 at 11:15 PM, Anthony Ramine
>>> <n.oxyde@REDACTED> wrote:
>>> Hello,
>>>
>>> I've noticed that Erlang/OTP own code tend to be space-free, e.g.
>>> {a,
>>> b} is rather written as {a,b}. Then there is the occasional Bin=
>>> <<42>> with a space because erl_scan will scans "=<<" as '=<','<'
>>> instead of '=','<<'. This patch teaches erl_scan how to not do
>>> that.
>>>
>>> There is no backwards compatibility problem as '=<','<' can't
>>> appear
>>> in valid code.
>>>
>>>          git fetch https://github.com/nox/otp.git
>>>          disambiguate-equal-binary
>>>
>>>          https://github.com/nox/otp/compare/disambiguate-equal-binary
>>>          https://github.com/nox/otp/compare/disambiguate-equal-binary.patch
>>>
>>> Regards,
>>>
>>> --
>>> Anthony Ramine
>>> _______________________________________________
>>> erlang-patches mailing list
>>> erlang-patches@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-patches
>>>
>>>
>>>
>>> --
>>> Sean Cribbs <sean@REDACTED>
>>> Software Engineer
>>> Basho Technologies, Inc.
>>> http://basho.com/
>>>
>>> _______________________________________________
>>> erlang-patches mailing list
>>> erlang-patches@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-patches
>>>
>>>
>>>
>>>
>>> --
>>> /* Sincerely
>>> --------------------------------------------------------------
>>> Pedram Nimreezi - Chief Technology Officer  */
>>>
>>> // The hardest part of design … is keeping features out. - Donald
>>> Norman
>>>
>>>
>>>
>>> _______________________________________________
>>> erlang-patches mailing list
>>> erlang-patches@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-patches
>>>
>>>
>>>
>>>
>>> --
>>> /* Sincerely
>>> --------------------------------------------------------------
>>> Pedram Nimreezi - Chief Technology Officer  */
>>>
>>> // The hardest part of design … is keeping features out. - Donald
>>> Norman
>>>
>>>
>>> _______________________________________________
>>> erlang-patches mailing list
>>> erlang-patches@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-patches
>>
>>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
>


-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the erlang-patches mailing list