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 6A67219C4A for ; Wed, 20 Apr 2016 20:16:28 +0000 (UTC) Received: (qmail 35255 invoked by uid 500); 20 Apr 2016 20:16:28 -0000 Delivered-To: apmail-freemarker-notifications-archive@freemarker.apache.org Received: (qmail 35237 invoked by uid 500); 20 Apr 2016 20:16: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 35228 invoked by uid 99); 20 Apr 2016 20:16:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2016 20:16:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id EBAE71A098F for ; Wed, 20 Apr 2016 20:16:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 8NflRy0RgY7Q for ; Wed, 20 Apr 2016 20:16:27 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 4CEAB5F476 for ; Wed, 20 Apr 2016 20:16:26 +0000 (UTC) Received: (qmail 33780 invoked by uid 99); 20 Apr 2016 20:16: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 20:16:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 735D92C14F4 for ; Wed, 20 Apr 2016 20:16:25 +0000 (UTC) Date: Wed, 20 Apr 2016 20:16:25 +0000 (UTC) From: =?utf-8?Q?Ondra_=C5=BDi=C5=BEka_=28JIRA=29?= 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= 5250621#comment-15250621 ]=20 Ondra =C5=BDi=C5=BEka commented on FREEMARKER-21: --------------------------------------- Even better :) > 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)