{"id":441,"date":"2011-06-14T19:55:00","date_gmt":"2011-06-14T19:55:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/java-lambda-syntax-alternatives.html"},"modified":"2012-10-21T19:49:42","modified_gmt":"2012-10-21T19:49:42","slug":"java-lambda-syntax-alternatives","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html","title":{"rendered":"Java Lambda Syntax Alternatives"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \/ function literals ought to look like. Let\u2019s look at a slightly non-trivial example and try to tease the issues out.<\/p>\n<p>The Perl people have a nice example of something which uses function references in a somewhat functional way \u2013 they call it the Schwartzian Transform (but I believe it\u2019s originally a Lisp trick sometimes called decorate-sort-undecorate). As there are just us JVM chickens here, I rewrote it in Clojure (it\u2019s actually one of my examples in Chapter 9 of the book).<\/p>\n<p>Here\u2019s a snippet of Clojure code which defines a function to perform the Schwartzian transform. Basically, it provides a very simple way of sorting a list based on an auxiliary function (called a \u201ckeying function\u201d) provided by the caller.<\/p>\n<pre class=\"brush:java\">(defn schwarz [x f]\r\n  (map #(nth %1 0)\r\n       (sort-by #(nth %1 1)\r\n                (map #(let [w %1]\r\n                     (list w (f w)) ) x))))\r\n<\/pre>\n<p>The code is doing three separate steps \u2013 creation of a list consisting of pairs (the original values paired up with the value obtained by applying the keying function to the original values), then sorting the pairs based on the values of the keying function. Finally a new list is constructed by taking only the original value from each pair in the sorted list-of-pairs (and discarding the keying function values).<\/p>\n<p>What might this look like in the various proposed Java syntax variants? Let\u2019s take a quick look at each one (note that because Java\u2019s type system is much more static, a lot of our type declarations are more than a little long-winded):<\/p>\n<pre class=\"brush:java\">\/\/ Strawman, with round brackets for single-expression lambdas\r\npublic List&lt;T&gt; schwarz(List&lt;T&gt; x, Function&lt;T, Pair&lt;T,V extends Comparable&lt;T&gt;&gt;&gt; f) {\r\nreturn map(#(T w)(makelist(w, f.apply(w))), x)\r\n       .sort(#(Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l)(l.get(1)))\r\n       .map(#(Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l)(l.get(0)));\r\n}\r\n\r\n\/\/ Strawman, with braces for all lambdas\r\npublic List&lt;T&gt; schwarz(List&lt;T&gt; x, Function&lt;T, Pair&lt;T,V extends Comparable&lt;T&gt;&gt;&gt; f) {\r\nreturn map(#(T w){makelist(w, f.apply(w))}, x)\r\n       .sort(#(Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l){l.get(1)})\r\n       .map(#(Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l){l.get(0)});\r\n}\r\n\r\n\/\/ BGGA\r\npublic List&lt;T&gt; schwarz(List&lt;T&gt; x, Function&lt;T, Pair&lt;T,V&gt;&gt; f) {\r\nreturn map({T w -&gt; makelist(w, f.apply(w))}, x)\r\n       .sort({Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l -&gt; l.get(1)})\r\n       .map({Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l -&gt; l.get(0)});\r\n}\r\n\r\n\/\/ SotL\r\npublic List&lt;T&gt; schwarz(List&lt;T&gt; x, Function&lt;T, Pair&lt;T,V&gt;&gt; f) {\r\nreturn map(#{T w -&gt; makelist(w, f.apply(w))}, x)\r\n       .sort(#{Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l -&gt; l.get(1)})\r\n       .map(#{Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l -&gt; l.get(0)});\r\n}\r\n\r\n\/\/ Redmond\r\npublic List&lt;T&gt; schwarz(List&lt;T&gt; x, Function&lt;T, Pair&lt;T,V extends Comparable&lt;T&gt;&gt;&gt; f) {\r\nreturn map((T w) -&gt; {makelist(w, f.apply(w))}, x)\r\n       .sort((Pair&lt;T,V extends Comparable&lt;T&gt;&gt; l) -&gt; {l.get(1)})\r\n       .map((Pair&lt;T, V extends Comparable&lt;T&gt;&gt; l) -&gt; {l.get(0)});\r\n}\r\n<\/pre>\n<p>How to evaluate them? My criteria are:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ol>\n<li>    Needs to start with a visible identifying mark, so that lambdas stand out from the surrounding code. The # is a handy character for this.<\/li>\n<li>    Needs to use the {} delimiting syntax. Closures are a kind of block, so they should be block-like in code.<\/li>\n<li>    Needs to be all in one piece, so the syntax has a visual consistency and the lambda appears as a single unit.<\/li>\n<li>    Preferably, needs to have a specialized short form for function literals which take no parameters (nullary lambdas).<\/li>\n<\/ol>\n<p>Based on these criteria, Redmond is the worst possible choice for me \u2013 and my experience writing Scala for the book bears this out \u2013 I found Scala\u2019s function literals much harder to use without problems than those in other languages. BGGA is a little better, but I don\u2019t like the lack of a simple identifying mark that tells me \u201cHello! I\u2019m a lambda\u201d.<\/p>\n<p>This brings it down to a choice to between SotL and Strawman with always-brace. The choice of these two is somewhat arbitrary. Strawman-always-brace looks, to my eyes like a true Java method declaration, but with the \u201cmagic name\u201d # \u2013 whereas SotL is genuinely new syntax, but feels closer to the Redmond and BGGA styles \u2013 so could well be an acceptable compromise for developers who are comfortable with those forms.<\/p>\n<p>Pulling it all together, my preferred choices are:<\/p>\n<ol>\n<li>    SotLhttp:\/\/www.blogger.com\/img\/blank.gif<\/li>\n<li>    Strawman-always-brace<\/li>\n<li>    BGGA<\/li>\n<li>    Strawman-single-expression-round<\/li>\n<li>    Redmond<\/li>\n<\/ol>\n<p>Please use the comments (below or at the <a href=\"http:\/\/www.java7developer.com\/blog\/?p=326\">original source<\/a>) to tell us what you make of this issue. Of course, this won\u2019t be in Java 7 \u2013 but it\u2019s not too early to start thinking about Java 8 and the future.<\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.java7developer.com\/blog\/?p=326\">Lambda Syntax Alternatives<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partners<\/a> at the <a href=\"http:\/\/www.java7developer.com\/blog\/\">Java 7 Developer Blog<\/a>.<\/p>\n<div style=\"margin: 0px\"><strong><i>Related Articles :<\/i><\/strong><\/div>\n<ul>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/04\/java-7-mac-os-x-status.html\">Official Java 7 for Mac OS X \u2013 Status<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/03\/glimpse-at-java-7-methodhandle-and-its.html\">A glimpse at Java 7 MethodHandle and its usage<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/03\/understanding-extending-java.html\">Understanding and Extending Java ClassLoader<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/02\/java-memory-model-quick-overview-and.html\">Java Memory Model &#8211; Quick overview and things to notice<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \/ function literals ought to look like. Let\u2019s look at a slightly non-trivial example and try to tease the issues out. The Perl people have a nice example of something which uses function references &hellip;<\/p>\n","protected":false},"author":32,"featured_media":148,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[196,197],"class_list":["post-441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-java","tag-java-8","tag-lambdas"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java Lambda Syntax Alternatives - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \/ function literals ought to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Lambda Syntax Alternatives - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \/ function literals ought to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2011-06-14T19:55:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T19:49:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Martijn Verburg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/karianna\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Martijn Verburg\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html\"},\"author\":{\"name\":\"Martijn Verburg\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/d8f543a943f3eda44199e2621b6b770e\"},\"headline\":\"Java Lambda Syntax Alternatives\",\"datePublished\":\"2011-06-14T19:55:00+00:00\",\"dateModified\":\"2012-10-21T19:49:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html\"},\"wordCount\":587,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"keywords\":[\"Java 8\",\"Lambdas\"],\"articleSection\":[\"Core Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html\",\"name\":\"Java Lambda Syntax Alternatives - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"datePublished\":\"2011-06-14T19:55:00+00:00\",\"dateModified\":\"2012-10-21T19:49:42+00:00\",\"description\":\"The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \\\/ function literals ought to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/06\\\/java-lambda-syntax-alternatives.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/core-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java Lambda Syntax Alternatives\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/d8f543a943f3eda44199e2621b6b770e\",\"name\":\"Martijn Verburg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d24079473a2d577b3631069efe522c7e0752a50536d49db4eb6930e118c478b7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d24079473a2d577b3631069efe522c7e0752a50536d49db4eb6930e118c478b7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d24079473a2d577b3631069efe522c7e0752a50536d49db4eb6930e118c478b7?s=96&d=mm&r=g\",\"caption\":\"Martijn Verburg\"},\"description\":\"Martijn (aka \\\"The Diabolical Developer\\\") is the co-founder and CTO of jClarity. He's a London Java Community leader, founder of the \\\"Adopt a JSR\\\" and \\\"Adopt OpenJDK\\\" programmes, a speaker at major conferences and the co-author of the Well-Grounded Java Developer.\",\"sameAs\":[\"http:\\\/\\\/www.java7developer.com\\\/blog\\\/\",\"http:\\\/\\\/uk.linkedin.com\\\/in\\\/martijnverburg\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/karianna\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Martijn-Verburg\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Lambda Syntax Alternatives - Java Code Geeks","description":"The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \/ function literals ought to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html","og_locale":"en_US","og_type":"article","og_title":"Java Lambda Syntax Alternatives - Java Code Geeks","og_description":"The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \/ function literals ought to","og_url":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2011-06-14T19:55:00+00:00","article_modified_time":"2012-10-21T19:49:42+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","type":"image\/jpeg"}],"author":"Martijn Verburg","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/karianna","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Martijn Verburg","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html"},"author":{"name":"Martijn Verburg","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/d8f543a943f3eda44199e2621b6b770e"},"headline":"Java Lambda Syntax Alternatives","datePublished":"2011-06-14T19:55:00+00:00","dateModified":"2012-10-21T19:49:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html"},"wordCount":587,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","keywords":["Java 8","Lambdas"],"articleSection":["Core Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html","url":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html","name":"Java Lambda Syntax Alternatives - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","datePublished":"2011-06-14T19:55:00+00:00","dateModified":"2012-10-21T19:49:42+00:00","description":"The discussion on the lambda-dev mailing list has started to address the issue of what the Java language syntax for lambdas \/ function literals ought to","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2011\/06\/java-lambda-syntax-alternatives.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/core-java"},{"@type":"ListItem","position":4,"name":"Java Lambda Syntax Alternatives"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/d8f543a943f3eda44199e2621b6b770e","name":"Martijn Verburg","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d24079473a2d577b3631069efe522c7e0752a50536d49db4eb6930e118c478b7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d24079473a2d577b3631069efe522c7e0752a50536d49db4eb6930e118c478b7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d24079473a2d577b3631069efe522c7e0752a50536d49db4eb6930e118c478b7?s=96&d=mm&r=g","caption":"Martijn Verburg"},"description":"Martijn (aka \"The Diabolical Developer\") is the co-founder and CTO of jClarity. He's a London Java Community leader, founder of the \"Adopt a JSR\" and \"Adopt OpenJDK\" programmes, a speaker at major conferences and the co-author of the Well-Grounded Java Developer.","sameAs":["http:\/\/www.java7developer.com\/blog\/","http:\/\/uk.linkedin.com\/in\/martijnverburg","https:\/\/x.com\/http:\/\/twitter.com\/karianna"],"url":"https:\/\/www.javacodegeeks.com\/author\/Martijn-Verburg"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=441"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/441\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/148"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}