# Question on namespaces

- Thread: https://externals.io/message/31246
- Original archive: https://news-web.php.net/php.internals/31246
- Started by Marcus Boerger on 2007-07-24T23:19:55+00:00
- Messages: 7
- 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

---

## #31246 — Marcus Boerger — 2007-07-24T23:19:55+00:00

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

Hello Dmitry, all,

  thanks for the namespaces.

  My only concern is that you took a package model and named it namespaces.
Can we change the keyword from 'namespace' to 'package'?

Best regards,
 Marcus

---

## #31248 — Stanislav Malyshev — 2007-07-25T00:04:07+00:00

URL: https://externals.io/message/31246#31248 · In reply to: #31246

>   My only concern is that you took a package model and named it namespaces.
> Can we change the keyword from 'namespace' to 'package'?

Actually, it's neither, but it's more like namespaces than packages 
IMHO. Though both terms are used in different languages in the roughly 
same sense.
-- 
Stanislav Malyshev, Zend Software Architect
stas@zend.com   http://www.zend.com/
(408)253-8829   MSN: stas@zend.com

---

## #31258 — Dmitry Stogov — 2007-07-25T05:36:41+00:00

URL: https://externals.io/message/31246#31258 · In reply to: #31246

Different languages have different 'package' model too.
For example Java, Ada and Python have packages, but they are too different.
BTW PHP's implementation is similar to Java packages and may be you are
right about renaming.

Thanks. Dmitry.

> -----Original Message-----
> From: Marcus Boerger [mailto:helly@php.net] 
> Sent: Wednesday, July 25, 2007 3:20 AM
> To: Dmitry Stogov; internals@lists.php.net
> Subject: Question on namespaces
> 
> 
> Hello Dmitry, all,
> 
>   thanks for the namespaces.
> 
>   My only concern is that you took a package model and named 
> it namespaces. Can we change the keyword from 'namespace' to 
> 'package'?
> 
> Best regards,
>  Marcus

---

## #31260 — Sebastian Bergmann — 2007-07-25T07:34:21+00:00

URL: https://externals.io/message/31246#31260 · In reply to: #31246

Marcus Boerger wrote:
> Can we change the keyword from 'namespace' to 'package'?

 I second that (e)motion. The current implementation of namespaces in PHP
 is so close to Java's packages that naming it packages makes (more)
 sense to me.

-- 
Sebastian Bergmann                          http://sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

---

## #31290 — Richard Lynch — 2007-07-27T03:58:26+00:00

URL: https://externals.io/message/31246#31290 · In reply to: #31260

> Marcus Boerger wrote:
> > […]
>
>  I second that (e)motion. The current implementation of namespaces in
> PHP
>  is so close to Java's packages that naming it packages makes (more)
>  sense to me.

It does smell more like a package to this user...

Though I'm more familiar with Modula-2 and [mumble] from 20 years ago
the last time I tried to use packages.

Oh, and Lisp and Lisp-derivatives, but I'm not sure that even applies
for comparison purposes.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

---

## #31292 — Cristian Rodriguez — 2007-07-27T05:08:38+00:00

URL: https://externals.io/message/31246#31292 · In reply to: #31260

> Marcus Boerger wrote:
> > […]
>
>  I second that (e)motion. The current implementation of namespaces in PHP
>  is so close to Java's packages that naming it packages makes (more)
>  sense to me.

Yes, that makes more sense ;-) +1

---

## #31328 — Marcus Boerger — 2007-07-30T19:21:42+00:00

URL: https://externals.io/message/31246#31328 · In reply to: #31248

Hello Stanislav,

  I use a broad variety of languages. And the older ones like C++ and Java
are pretty distinctive. Namespaces have a dedicated range or space declared
by curly braces and can contain other namespaces. Whileas Java packages are
file wide. And actually that is much easier and quite what we want. We want
this connection from a file to a namespace erm making a file giving a name
prefix automatically. We do not want the confusion namespaces in the C++
sense can bring. So yes I like the implementation Dmitry did a lot - it just
seems wrong to me calling them namespaces purely because we called them that
prior to 5.0 release and becasue we always called them so in discussions.
But the implementation is also quite different from anything we discussed
outside of the paris meeting. That's all from my side.

marcus

Wednesday, July 25, 2007, 2:04:07 AM, you wrote:

> > […]

> Actually, it's neither, but it's more like namespaces than packages 
> IMHO. Though both terms are used in different languages in the roughly 
> same sense.



Best regards,
 Marcus
