Re: Escaping in strings according to WOML
Re: Escaping in strings according to WOML
- Subject: Re: Escaping in strings according to WOML
- From: Chuck Hill <email@hidden>
- Date: Mon, 29 Jun 2009 13:05:50 -0700
On Jun 29, 2009, at 12:28 PM, Mike Schrag wrote:
* though not technically a parser feature, I think our if/else
syntax makes more logical sense -- this is a total religious
debate though
For the record, Mike is wrong on this one. The WOML syntax is
correct.
I think it's fairly obviously that Drew and I are going to require
counseling to resolve this one ...
Uh oh ... the votes are starting :)
The defense of my position is that, to me, the Wonder style more
closely matches how an if/else appears in code:
<wo:if condition="whatever">
do something
</wo:if>
<wo:else>
do something else
</wo:else>
While I like to read this more, nesting does confuse this:
<wo:if condition="whatever">
do something
</wo:if>
<wo:if condition="whatever2">
do something
</wo:if>
<wo:else>
do something else
</wo:else>
vs
<wo:if condition="whatever">
do something
<wo:if condition="whatever2">
do something
</wo:if>
<wo:else>
do something else
</wo:else>
</wo:if>
Chuck
seems to nicely match:
if (whatever) {
// do something
} else {
// do something else
}
whereas the 5.4 conditional style is:
<wo:if condition="whatever">
do something
<wo:else>
do something else
</wo:else>
</wo:if>
which would be equivalent to:
if (whatever) {
// do something
else {
// do something else
}
}
it seems weird to me that the else is INSIDE the if conditional ...
if the if-conditional evaluates to false, i intuitively expect
nothing inside the if to render, but that's not what 5.4 does.
admittedly, this is super nit-picky, and anyone using either style
would find the other to be weird, probably.
alas, we have "legacy code" in BOTH ways now, because (as with
inline bindings) both sides developed the features without knowledge
of the other.
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden