[Oc-pm] spaces in perl6

Ramana V Mokkapati mvr707 at gmail.com
Tue Oct 31 11:43:31 PDT 2017


I did not see any inconsistency ... for me,...

"say (1,2)" is same as "say((1,2))" since we are passing a tuple to the
subroutine.

"printf (1,2)" and printf(1,2)" are different - in the former, we are
passing only one parameter as input.


On Tue, Oct 31, 2017 at 11:28 AM, Erick Jordan <erickfjordan at gmail.com>
wrote:

> You're right.  Horribly inconsistent.
>
> > printf ("%d + %d = %d\n", 4,5,1)
> Your printf-style directives specify 3 arguments, but no argument was
> supplied
>
> > printf("%d + %d = %d\n", 4,5,1)
> 4 + 5 = 1
>
> Something changed.
>
> On Tue, Oct 31, 2017 at 10:05 AM Bob Mathews <bobmath11 at icloud.com> wrote:
>
>> It seems that space-before-paren is still significant in Perl6. The first
>> two statements print a 1 immediately followed by a 2...
>>
>> > say 1, 2
>> 12
>> > say(1,2)
>> 12
>> > say (1,2)
>> (1 2)
>>
>> ...and the third prints a tuple containing one and two.
>>
>>  -bob
>>
>> _______________________________________________
>> Oc-pm mailing list
>> Oc-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/oc-pm
>>
>
> _______________________________________________
> Oc-pm mailing list
> Oc-pm at pm.org
> http://mail.pm.org/mailman/listinfo/oc-pm
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/oc-pm/attachments/20171031/ad1b3607/attachment.html>


More information about the Oc-pm mailing list