[TYPO3-core] RFC: #11201: Feature: add eval email

Patrick Broens patrick at netcreators.com
Wed May 27 16:38:48 CEST 2009


Hi Steffen,

Steffen Kamper wrote:
> Hi benni,
> 
> Benjamin Mack schrieb:
>> Hey Steffen,
>>
>> why are you using "with(value)", do we need this thre at all?
>>
> 
> just a shortcut

I was wondering the same as Benni.

Normally you use the with() statement to reduce object references, but
you're not using it for that purpose, because you repeat "value" within
the with() statement. That doesn't seem logical.

I suppose it then must be:
var apos = indexOf("@");
var dotpos = lastIndexOf(".");

Or am I wrong here?

The current syntax looks to me like
with(value as value) {
	...
}

or
with(value = value) {
	...
}

Remember that the with() statement is very slow comparing to a full
written object reference. It's not really recommended to use, because of
the confusion it often generates (like now)

Cheers

Patrick



More information about the TYPO3-team-core mailing list