Return-Path: X-Original-To: apmail-freemarker-notifications-archive@minotaur.apache.org Delivered-To: apmail-freemarker-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1393919EDE for ; Wed, 20 Apr 2016 21:07:29 +0000 (UTC) Received: (qmail 75131 invoked by uid 500); 20 Apr 2016 21:07:28 -0000 Delivered-To: apmail-freemarker-notifications-archive@freemarker.apache.org Received: (qmail 75110 invoked by uid 500); 20 Apr 2016 21:07:28 -0000 Mailing-List: contact notifications-help@freemarker.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@freemarker.incubator.apache.org Delivered-To: mailing list notifications@freemarker.incubator.apache.org Received: (qmail 75101 invoked by uid 99); 20 Apr 2016 21:07:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2016 21:07:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 56BBEC0319 for ; Wed, 20 Apr 2016 21:07:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id FAcvHJ9TrWZV for ; Wed, 20 Apr 2016 21:07:27 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id A01515F282 for ; Wed, 20 Apr 2016 21:07:26 +0000 (UTC) Received: (qmail 74810 invoked by uid 99); 20 Apr 2016 21:07:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2016 21:07:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 872DD2C14F7 for ; Wed, 20 Apr 2016 21:07:25 +0000 (UTC) Date: Wed, 20 Apr 2016 21:07:25 +0000 (UTC) From: "Daniel Dekany (JIRA)" To: notifications@freemarker.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FREEMARKER-21) Reference to the object in condition - avoid repeating the same in #if and ${...} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FREEMARKER-21?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1= 5250715#comment-15250715 ]=20 Daniel Dekany commented on FREEMARKER-21: ----------------------------------------- {{as}} clashes with {{<#list xs as x>}}... so it should be {{into}} or some= thing like that. > Reference to the object in condition - avoid repeating the same in #if an= d ${...} > -------------------------------------------------------------------------= -------- > > Key: FREEMARKER-21 > URL: https://issues.apache.org/jira/browse/FREEMARKER-21 > Project: Apache Freemarker > Issue Type: New Feature > Components: engine > Reporter: Ondra =C5=BDi=C5=BEka > Fix For: 2.3.23 > > > Repeating stuff is annoying, especially in programming. > Therefore this is annoying: > {code} > <#if someVariable.someMethod.someProperty??> >
${someVariable.someMethod.someProperty}
> > {code} > This would be better: > {code} > <#if someVariable.someMethod.someProperty?? as value> >
${value}
> > {code} > Not talking about the fact that it could only be evaluated once. -- This message was sent by Atlassian JIRA (v6.3.4#6332)