This thread reminds me of what I found hardest about the Lisp language.
How many evals?  how many quotes?  I remember a lot of trial and error...

Regarding

>  L1 = 1,2,3;
>  L2 = (1,2,3);
>  process = ba.count(L1), ba.count((L1)), ba.count(L2), ba.count((L2));

I think 3, 1, 1, 1 would be the best answer, and 3, 1, 3, 1 second best,
although I know it is now 3, 3, 3, 3.
In any case, all implicit eval rules should be clearly predictable and
documented.

Cheers,
- Julius

On Sat, May 23, 2020 at 9:46 AM Oleg Nesterov <[email protected]> wrote:

> Dario,
>
> I'm afraid I can't help. Firstly, I do not really understand your
> questions.
> But even if I understood, I am not sure I could answer authoritatively.
>
> On 05/22, Dario Sanfilippo wrote:
> >
> > On Fri, 22 May 2020 at 20:22, Oleg Nesterov <[email protected]> wrote:
> >
> > > On 05/22, Dario Sanfilippo wrote:
> > > >
> > > > Sorry for the confusion. What I wanted to ask is: why aren't the
> extra
> > > > parentheses making a difference? Because (0, (1,2,3)) is parsed as
> > > > ((0),((1,2,3)), right?
> >
> >
> > I missed a parenthesis, I meant that  (0, (1,2,3)) is parsed as ((0),
> > ((1,2,3)))
>
> Why do you think so? OK, please consider
>
>         f(((x,y))) = x+y;
>         f( (x,y) ) = x-y;
>
>         process(x,y) = f((x,y));
>
> note the compiler warning:
>
>         WARNING : shadowed pattern-matching rule: (<x>,<y>) => x,y : -;
>         previous rule was: (<x>,<y>) => x,y : +;
>
> See? The extra parentheses make no difference.
>
> And why do you think they should? IMO, this would be insane. Suppose you
> change the compiler so that ba.count(((1,2,3))) returns 1. Now, what should
> this program
>
>         L1 = 1,2,3;
>         L2 = (1,2,3);
>
>         process = ba.count(L1), ba.count((L1)),
>                   ba.count(L2), ba.count((L2));
>
> output?
>
> Or this one
>
>         process = ba.count(par(i,3,i)), ba.count((par(i,3,i)));
>
> ?
>
> The current rules are at least clear/understandable, and whatever you or
> me think it is too late to change them.
>
> Oleg.
>
>
>
> _______________________________________________
> Faudiostream-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>


-- 
"Anybody who knows all about nothing knows everything" -- Leonard Susskind
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to