Maybe there *are* drawbacks of ad-hoc parsers, after all. I don't want to be offensive, really, I like Julia... but the absence of a formal specification of the grammar is nothing to be proud of.
Am Dienstag, 19. August 2014 01:39:53 UTC+2 schrieb Stefan Karpinski: > > That seems likely. > > On Aug 18, 2014, at 7:24 PM, Elliot Saba <stati...@gmail.com <javascript:>> > wrote: > > Probably because of our special parsing of & in ccall invocations. > -E > > > On Mon, Aug 18, 2014 at 7:14 PM, Stefan Karpinski <ste...@karpinski.org > <javascript:>> wrote: > >> Yeah, I forget exactly why you can't to that with & but there's some >> parsing ambiguity. >> >> >> On Mon, Aug 18, 2014 at 6:33 PM, ggggg <galen...@gmail.com <javascript:>> >> wrote: >> >>> Ok, thanks. Although it doesn't seem to be the case for |, eg "|(true, >>> false)" works out of the box. >>> >>> >>> On Monday, August 18, 2014 4:24:31 PM UTC-6, Stefan Karpinski wrote: >>> >>>> This are some of those few operators that need parens to be used in >>>> function call syntax: >>>> >>>> julia> (&)(3,5) >>>> 1 >>>> >>>> julia> (|)(3,5) >>>> 7 >>>> >>>> >>>> This isn't required in unambiguous situations like as an argument to >>>> another function: >>>> >>>> julia> reduce(|, 0:8) >>>> 15 >>>> >>>> >>>> >>>> >>>> On Mon, Aug 18, 2014 at 6:20 PM, ggggg <galen...@gmail.com> wrote: >>>> >>>>> Is there a named function that does what & does, eg "&(a,b) == a&b"? I >>>>> actually want a multi argument version like "$(a,b,c...)". Also is that >>>>> the name of that function is not "&" and "& is not overloadable? The same >>>>> is not true of "|". >>>>> >>>>> *julia> **a = zeros(Bool,10);b=[randbool() for j=1:10];* >>>>> >>>>> *julia> **a&b==b* >>>>> >>>>> *false* >>>>> >>>>> *julia> **a|b==b* >>>>> >>>>> *true* >>>>> >>>>> *julia> **|(a,b)==b* >>>>> >>>>> *true* >>>>> >>>>> *julia> **&(a,b)==b* >>>>> >>>>> >>>>> *ERROR: unsupported or misplaced expression & * >>>>> *julia> **&(a,b) = a&b* >>>>> >>>>> *ERROR: syntax: invalid assignment location* >>>>> >>>>> Julia even seems to think & is a function >>>>> >>>>> *julia> **&* >>>>> >>>>> *& (generic function with 35 methods)* >>>>> >>>>> >>>>> >>>> >> >