[TYPO3-core] Double backslash for namespace

Markus Klein klein.t3 at mfc-linz.at
Tue Jun 17 11:57:20 CEST 2014


Very interesting.


looks like the German version (which is actually still in English) is more up to date than the English version.
At least the German version already mentions PHP6 and does not impose a memory limit for strings.

If I consider what they say in the German version, I'd also opt for changing this to single backslash, as it eases readability and speeds up development as you can simply copy the namespace and there's no need to insert the backslashes manually.
I quickly tested Bernhard's example on PHP 5.3.x and it works just fine.

Kind regards

Markus Klein
TYPO3 CMS Active Contributors Team Member

> -----Original Message-----
> From: typo3-team-core-bounces at lists.typo3.org [mailto:typo3-team-core-
> bounces at lists.typo3.org] On Behalf Of Bernhard Kraft
> Sent: Tuesday, June 17, 2014 11:17 AM
> To: typo3-team-core at lists.typo3.org
> Subject: Re: [TYPO3-core] Double backslash for namespace
> On 06/17/2014 11:07 AM, Bernhard Kraft wrote:
> > So if we stick to single-quoted strings as usual in TYPO3 world it
> > would be ok to have only one backslash.
> Some examples:
> http://paste.ubuntu.com/7657458/
> Note that only the last example would yield an error
> According to this:
> http://www.php.net/manual/de/language.types.string.php#language.types
> .string.syntax.single
> The only reason for having a double backslash would be to
> * have a literal backslash before a literal single qoute
> * Have a backslash at the end of a string
> None of those woule be required for namespacing.
> greetings,
> Bernhard
> _______________________________________________
> Before posting to this list, please have a look to the posting rules on the
> following websites:
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core

More information about the TYPO3-team-core mailing list