# backslash, really ... ?

- Thread: https://externals.io/message/48127
- Original archive: https://news-web.php.net/php.internals/48127
- Started by Sylvain Rabot on 2010-04-28T21:45:41+00:00
- Messages: 10
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #48127 — Sylvain Rabot — 2010-04-28T21:45:41+00:00

URL: https://externals.io/message/48127#48127

Hi,

The comment I'm about to make is behind the times, and, now, useless, I
know, but I can't hold me.

You chose for the namespace feature, a great feature besides, the
backslash ?? really ?? Come on guys, among all the possibilities, you
have chosen, according to me, the most hideous character possible.

Having Windows©®™ path like strings in the middle of source code is not
something that is going to make me use the feature.

PHP syntax was simple, clean. To me, the backslash token ruins
everything. Using it aside from escaping was something I have never
considered, have you ? Do you like it ?

The goal of backslash was maybe to highlight namespace in the source
code, if it was, congrats, we only see that now.
To my opinion it breaks all esthetic's balance of a source code.

No need to respond that I should have contribute to the choice, believe
me, if I could have, I would have.

This was just the comment of a simple guy which is very concerned about
source code esthetic's and believes that a neat, well balanced code is
more likely to be well maintained that any other one.

Best regards.

-- 
Sylvain Rabot <sylvain@abstraction.fr

---

## #48128 — Matt Wilson — 2010-04-28T21:58:23+00:00

URL: https://externals.io/message/48127#48128 · In reply to: #48127

So, you decided to jump in to criticize a design decision that went in after several months of discussion, without any insight into why it was done the way it was?



> Hi,
> 
> The comment I'm about to make is behind the times, and, now, useless, I
> know, but I can't hold me.
> 
> You chose for the namespace feature, a great feature besides, the
> backslash ?? really ?? Come on guys, among all the possibilities, you
> have chosen, according to me, the most hideous character possible.
> 
> Having Windows©®™ path like strings in the middle of source code is not
> something that is going to make me use the feature.
> 
> PHP syntax was simple, clean. To me, the backslash token ruins
> everything. Using it aside from escaping was something I have never
> considered, have you ? Do you like it ?
> 
> The goal of backslash was maybe to highlight namespace in the source
> code, if it was, congrats, we only see that now.
> To my opinion it breaks all esthetic's balance of a source code.
> 
> No need to respond that I should have contribute to the choice, believe
> me, if I could have, I would have.
> 
> This was just the comment of a simple guy which is very concerned about
> source code esthetic's and believes that a neat, well balanced code is
> more likely to be well maintained that any other one.
> 
> Best regards.
> 
> -- 
> Sylvain Rabot <sylvain@abstraction.fr

---

## #48129 — Sylvain Rabot — 2010-04-28T22:23:35+00:00

URL: https://externals.io/message/48127#48129 · In reply to: #48128

> So, you decided to jump in to criticize a design decision that went in after several months of discussion, without any insight into why it was done the way it was?
> 

Not really criticizing, maybe a bit, but more expressing my
disappointment regarding aesthetic loss that the choice made has lead
to. It might not concern you but it does concern me and probably other
people too.

I admit I have no knowledge of what have been told during the months of
discussion you are referring to. However, you seem to have this
knowledge, so I would be grateful if you could tell me if the aesthetic
of the backslash token has been discussed and even more if you can
redirect me to a discussion thread.

Regards.

> 
> 
> > […]
> 
> 


-- 
Sylvain Rabot <sylvain@abstraction.fr

---

## #48130 — Chad Fulton — 2010-04-28T22:29:24+00:00

URL: https://externals.io/message/48127#48130 · In reply to: #48129

You can take a look at the RFP if you like. It discusses the pros and cons
of various possible separators, and why they chose the backslash.

http://wiki.php.net/rfc/namespaceseparator

<http://wiki.php.net/rfc/namespaceseparator>I've been using namespaces for a
few months now with the backslash syntax, and I have to say that it doesn't
effect the aesthetics or readability of my code. Give it some time, I
suspect you'll get used to it in no time.

On Wed, Apr 28, 2010 at 3:23 PM, Sylvain Rabot <sylvain@abstraction.fr>wrote:

> 
> > […]
> after several months of discussion, without any insight into why it was done
> the way it was?
> > […]
>
> Not really criticizing, maybe a bit, but more expressing my
> disappointment regarding aesthetic loss that the choice made has lead
> to. It might not concern you but it does concern me and probably other
> people too.
>
> I admit I have no knowledge of what have been told during the months of
> discussion you are referring to. However, you seem to have this
> knowledge, so I would be grateful if you could tell me if the aesthetic
> of the backslash token has been discussed and even more if you can
> redirect me to a discussion thread.
>
> Regards.
>
> > […]
>
>
> --
> Sylvain Rabot <sylvain@abstraction.fr

---

## #48131 — Sylvain Rabot — 2010-04-28T22:40:36+00:00

URL: https://externals.io/message/48127#48131 · In reply to: #48130

> You can take a look at the RFP if you like. It discusses the pros and cons
> of various possible separators, and why they chose the backslash.
> 
> http://wiki.php.net/rfc/namespaceseparator

Thanks.

> 
> <http://wiki.php.net/rfc/namespaceseparator>I've been using namespaces for a
> few months now with the backslash syntax, and I have to say that it doesn't
> effect the aesthetics or readability of my code. Give it some time, I
> suspect you'll get used to it in no time.

You might not be as stubborned as I can be regarding this matter :P

Backslash is just something not "natural" to me. Anyway, my obsession,
my problem. Was just hopping to find people as disturbed as me :)

> 
> On Wed, Apr 28, 2010 at 3:23 PM, Sylvain Rabot <sylvain@abstraction.fr>wrote:
> 
> > […]


-- 
Sylvain Rabot <sylvain@abstraction.fr

---

## #48132 — jerome@loyet.net — 2010-04-28T22:44:46+00:00

URL: https://externals.io/message/48127#48132 · In reply to: #48131

2010/4/29 Sylvain Rabot <sylvain@abstraction.fr>:
> 
> > […]
>
> Thanks.
>
> > […]
>
> You might not be as stubborned as I can be regarding this matter :P
>
> Backslash is just something not "natural" to me. Anyway, my obsession,
> my problem. Was just hopping to find people as disturbed as me :)
>
> > […]

It's because you're using a french keyboard and you have to hit two
keys (Alt-gr + 8) to obtain a backslash.
I agree with you it could be boring, that why when I'm coding I'm
sometimes using a qwerty keymap :)

++ Jerome

> > […]
>
>
> --
> Sylvain Rabot <sylvain@abstraction.fr

---

## #48133 — Sylvain Rabot — 2010-04-28T22:52:10+00:00

URL: https://externals.io/message/48127#48133 · In reply to: #48132

> 2010/4/29 Sylvain Rabot <sylvain@abstraction.fr>:
> > […]
> 
> It's because you're using a french keyboard and you have to hit two
> keys (Alt-gr + 8) to obtain a backslash.

Not at all, azerty rocks, I can be really agile with my fingers and I
love to do keyboard tricks with them :P

> I agree with you it could be boring, that why when I'm coding I'm
> sometimes using a qwerty keymap :)
> 
> ++ Jerome
> 
> > […]
> 


-- 
Sylvain Rabot <sylvain@abstraction.fr

---

## #48134 — Robert Cummings — 2010-04-28T23:30:01+00:00

URL: https://externals.io/message/48127#48134 · In reply to: #48131

Sylvain Rabot wrote:
> 
> > […]
> 
> Thanks.
> 
> > […]
> 
> You might not be as stubborned as I can be regarding this matter :P

Your stubbornness should have nothing to do with the aesthetics of code 
operators. You've entered the discussion with a preconceived standpoint.

> Backslash is just something not "natural" to me. Anyway, my obsession,
> my problem. Was just hopping to find people as disturbed as me :)

And yet in Linux we use forward slashes for paths and we've never had a 
problem also using a forward slash for division, truncation, or one line 
comments. What have you ever escaped that didn't fall within some kind 
of string delimiter? A backspace outside of a string delimiter shouldn't 
cause confusion in most programming languages.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP

---

## #48139 — Hannes Magnusson — 2010-04-29T08:22:15+00:00

URL: https://externals.io/message/48127#48139 · In reply to: #48127

> You chose for the namespace feature, a great feature besides, the
> backslash ?? really ?? Come on guys, among all the possibilities, you
> have chosen, according to me, the most hideous character possible.

I've been using namespaces for several months now and I like it.
Felt a bit strange in the beginning, but so did writing 'function'
when declaring methods.

This is how the language is. You get used to it (I even hear that some
people get used to the WS requirements in python...).

-Hannes

---

## #48167 — Greg Beaver — 2010-04-30T05:37:57+00:00

URL: https://externals.io/message/48127#48167 · In reply to: #48127

> Hi,
> 
> The comment I'm about to make is behind the times, and, now, useless, I
> know, but I can't hold me.
> 
> You chose for the namespace feature, a great feature besides, the
> backslash ?? really ?? Come on guys, among all the possibilities, you
> have chosen, according to me, the most hideous character possible.
> 
> Having Windows©®™ path like strings in the middle of source code is not
> something that is going to make me use the feature.
> 
> PHP syntax was simple, clean. To me, the backslash token ruins
> everything. Using it aside from escaping was something I have never
> considered, have you ? Do you like it ?
> 
> The goal of backslash was maybe to highlight namespace in the source
> code, if it was, congrats, we only see that now.
> To my opinion it breaks all esthetic's balance of a source code.
> 
> No need to respond that I should have contribute to the choice, believe
> me, if I could have, I would have.
> 
> This was just the comment of a simple guy which is very concerned about
> source code esthetic's and believes that a neat, well balanced code is
> more likely to be well maintained that any other one.

You probably haven't tried using it much yet.  The primary annoyances
I've found with namespaces are:

1) forgetting to \Prefix internal class names like Iterator
2) people who complain about the namespace separator because it's cool
to do so with zero understanding of the technical challenges or the
aesthetic (yes, aesthetic) wrangling that went into the choice

Otherwise, it works (no small achievement: namespaces + PHP + autoload
is a nightmare to do properly, you should thank Dmitry and Stas for
their hard work as well as the countless pre-iterations that inspired
the final version), with no unexpected name resolution problems or
performance issues.

As a reminder, in programming aesthetics = the elegance, performance and
robustness of a problem's solution.  If you're caught up on whether your
code has the exact right kind of visual look (beyond an enforced coding
standard), perhaps you could benefit from a good old-fashioned traffic
spike to your site to correct the impulse. :)

Regards,
Greg
