The prefix symbol

Kieron.Wilkinson at paretopartners.com Kieron.Wilkinson at paretopartners.com
Wed Jun 22 00:33:55 PDT 2011


It doesn't have to be too difficult. You would just configure your IDE so 
that when you type ",\", (or whatever) it would get replaced by the lambda 
symbol. I'm not sure that is a good enough argument to justify doing 
something wildly different than before though, especially in Java.

[Don't take this as implicit agreement I am in favour of having a lambda 
symbol at all, apart from maybe method references]

Kieron

Colin Decker wrote on 21/06/2011 22:56:30:
> How does it actually *help* anything to use some annoying to type symbol 
for
> this? It being cool won't do anyone any good.
> 
> -- 
> Colin
> 
> 
> On Tue, Jun 21, 2011 at 5:45 PM, Lawrence Kesteloot <lk at teamten.com> 
wrote:
> 
> > Okay so this is 2011. Can we use the Unicode lambda symbol? Of course
> > also support some digraph, like ,\
> >
> > IDEs would adapt instantly, as would window-based editors like gvim.
> > Terminal text editors might have problems. Then there are possible
> > problems with source file encoding ambiguity (when not specified
> > explicitly).
> >
> > So yeah there would be a bunch of problems, but if we could solve
> > them, how *cool* would that be?
> >
> > Lawrence
> >
> >
> >
> > On Tue, Jun 21, 2011 at 8:27 PM, maurizio cimadamore
> > <maurizio.cimadamore at oracle.com> wrote:
> > > On 21/06/2011 17:47, Pavel Minaev wrote:
> > >> Isn't this only true for statement lambdas? What about Strawman
> > >> expression syntax, which doesn't have ')' '{'?
> > > I was assuming a simplified version of Strawman (that has been 
discussed
> > > in this mailing list) in which both statements and expressions have 
the
> > > '{' '}'.
> > >
> > > Maurizio
> > >>
> > >> Either way, it seems that it would require infinite lookahead to 
parse?
> > >>
> > >> On Tue, Jun 21, 2011 at 9:18 AM, Maurizio Cimadamore
> > >> <maurizio.cimadamore at oracle.com
> > >> <mailto:maurizio.cimadamore at oracle.com>> wrote:
> > >>
> > >>     On 21/06/11 17:14, Sam Pullara wrote:
> > >>     > Both the $ and _ are valid method names so this would likely 
not
> > >>     work.
> > >>     This wouldn't be much of a problem, as the Strawman syntax 
cannot
> > >>     possibly be confused with a method call - the compiler would 
need to
> > >>     look for the 'special' token sequence ')' '{' after the '_' or 
'$'.
> > >>
> > >>     Maurizio
> > >>     > Sam
> > >>     >
> > >>     > On Jun 21, 2011, at 2:57 AM, Maurizio Cimadamore wrote:
> > >>     >
> > >>     >> On 21/06/11 10:42, Milos Nikic wrote:
> > >>     >>> Well since you are mentioning, i think it is not 
unreasonable
> > >>     to say that
> > >>     >>> $ could be on this list too.
> > >>     >>> $ is not very different than #, in that java web developers
> > >>     use # for jsf
> > >>     >>> based expressions, and $ for jsp ones.
> > >>     >>>
> > >>     >>> $(x) { return x + 1; }
> > >>     >>> ${x ->   x + 1}
> > >>     >> What about '_' as in:
> > >>     >>
> > >>     >> _(x) { return x + 1; }
> > >>     >>
> > >>     >>
> > >>     >> It's less intrusive than # and it has that 'unnamed' feeling 
that
> > I
> > >>     >> think fits well in this case...
> > >>     >>
> > >>     >> Maurizio
> > >>     >>> Regards,
> > >>     >>> Milos
> > >>     >>>
> > >>     >>> On Tue, Jun 21, 2011 at 11:35 AM, Stephen Colebourne
> > >>     >>> <scolebourne at joda.org <mailto:scolebourne at joda.org>>wrote:
> > >>     >>>
> > >>     >>>> Prefix character summary after 15 hours:
> > >>     >>>>
> > >>     >>>> Use a #
> > >>     >>>>   #(x) { return x + 1; }
> > >>     >>>>   #{x ->   x + 1}
> > >>     >>>>
> > >>     >>>> Use a ^
> > >>     >>>>   ^(x) { return x + 1; }
> > >>     >>>>   ^{x ->   x + 1}
> > >>     >>>>
> > >>     >>>> Use a \ (from another thread)
> > >>     >>>>   \(x) { return x + 1; }
> > >>     >>>>   \{x ->   x + 1}
> > >>     >>>>
> > >>     >>>> (I'm not listing keywords that have been suggested 
elsewhere)
> > >>     >>>>
> > >>     >>>> Issues around typing the various characters on different
> > >>     keyboards
> > >>     >>>> have been raised.
> > >>     >>>>
> > >>     >>>> Once again, does anyone have a character they prefer more
> > >>     than one of
> > >>     >>>> the three above that they want to be considered? Remember,
> > >>     this isn't
> > >>     >>>> a vote, or a discussion thread, but a "gathering the 
options"
> > >>     thread.
> > >>     >>>>
> > >>     >>>> Stephen
> > >>     >>>>
> > >>     >>>>
> > >>     >>>> On 20 June 2011 18:54, Stephen
> > >>     Colebourne<scolebourne at joda.org <mailto:scolebourne at joda.org>>
> > >>     wrote:
> > >>     >>>>> The four syntax families split into two types, those with 
a
> > >>     prefix
> > >>     >>>>> symbol and those without.
> > >>     >>>>>
> > >>     >>>>> The prefix symbol is commonly mentioned as #:
> > >>     >>>>>
> > >>     >>>>> #(x) { return x + 1; }
> > >>     >>>>> #{x ->   x + 1}
> > >>     >>>>>
> > >>     >>>>>
> > >>     >>>>> *** If you have a strong desire to see any symbol other 
than #
> > >>     >>>>> considered then please respond to this thread. ***
> > >>     >>>>>
> > >>     >>>>> - Your reply MUST specify the symbol
> > >>     >>>>> - Your reply MUST give a brief justification
> > >>     >>>>> - Your reply MUST repeat the two examples above using 
your
> > >>     preferred
> > >>     >>>> symbol
> > >>     >>>>> - You SHOULD try to ensure that your alternate symbol 
choice
> > >>     would
> > >>     >>>>> parse acceptably
> > >>     >>>>> - You MAY reply to suggest a keyword, however you should
> > >>     expect that
> > >>     >>>>> to be rejected
> > >>     >>>>>
> > >>     >>>>> Thread rules:
> > >>     >>>>> - Only reply if you prefer your alternate symbol to #
> > >>     >>>>> - To discuss something, change the thread title
> > >>     >>>>> - Don't reply just to say "I don't want a prefix symbol"
> > >>     >>>>> - Responding with a symbol suggestion doesn't preclude 
your
> > >>     first
> > >>     >>>>> choice actually being "no prefix symbol"
> > >>     >>>>>
> > >>     >>>>> For example, my preferred choice of prefix symbol is #, 
thus
> > >>     I should
> > >>     >>>>> not respond to this thread!
> > >>     >>>>>
> > >>     >>>>> Stephen
> > >>     >>>>> (this is an experiment to see if we can focus on one
> > particular
> > >>     >>>>> discussion element at a time)
> > >>     >>>>>
> > >>     >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> 


This message may contain confidential and privileged information and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorised. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator and then immediately delete this message. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.

Please refer to http://www.bnymellon.com/disclaimer/piml.html for certain disclosures.


More information about the lambda-dev mailing list