* [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename
@ 2025-05-30 15:46 fxn (Xavier Noria) via ruby-core
2025-05-30 15:47 ` [ruby-core:122344] " fxn (Xavier Noria) via ruby-core
` (21 more replies)
0 siblings, 22 replies; 23+ messages in thread
From: fxn (Xavier Noria) via ruby-core @ 2025-05-30 15:46 UTC (permalink / raw)
To: ruby-core; +Cc: fxn (Xavier Noria)
Issue #21385 has been reported by fxn (Xavier Noria).
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122344] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
@ 2025-05-30 15:47 ` fxn (Xavier Noria) via ruby-core
2025-05-30 16:37 ` [ruby-core:122346] " matheusrich (Matheus Richard) via ruby-core
` (20 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: fxn (Xavier Noria) via ruby-core @ 2025-05-30 15:47 UTC (permalink / raw)
To: ruby-core; +Cc: fxn (Xavier Noria)
Issue #21385 has been updated by fxn (Xavier Noria).
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113490
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122346] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
2025-05-30 15:47 ` [ruby-core:122344] " fxn (Xavier Noria) via ruby-core
@ 2025-05-30 16:37 ` matheusrich (Matheus Richard) via ruby-core
2025-05-30 17:02 ` [ruby-core:122347] " fxn (Xavier Noria) via ruby-core
` (19 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: matheusrich (Matheus Richard) via ruby-core @ 2025-05-30 16:37 UTC (permalink / raw)
To: ruby-core; +Cc: matheusrich (Matheus Richard)
Issue #21385 has been updated by matheusrich (Matheus Richard).
Another suggestion: Context.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113492
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122347] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
2025-05-30 15:47 ` [ruby-core:122344] " fxn (Xavier Noria) via ruby-core
2025-05-30 16:37 ` [ruby-core:122346] " matheusrich (Matheus Richard) via ruby-core
@ 2025-05-30 17:02 ` fxn (Xavier Noria) via ruby-core
2025-06-01 20:10 ` [ruby-core:122366] " Eregon (Benoit Daloze) via ruby-core
` (18 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: fxn (Xavier Noria) via ruby-core @ 2025-05-30 17:02 UTC (permalink / raw)
To: ruby-core; +Cc: fxn (Xavier Noria)
Issue #21385 has been updated by fxn (Xavier Noria).
More evidence.
The CRuby code base has the predicate `rb_namespace_p` (I think, since Ruby 2.7):
```c
static inline bool
rb_namespace_p(VALUE obj)
{
if (RB_SPECIAL_CONST_P(obj)) return false;
switch (RB_BUILTIN_TYPE(obj)) {
case T_MODULE: case T_CLASS: return true;
default: break;
}
return false;
}
```
and now it has a macro with similar name, but different meaning:
```c
#define IS_NAMESPACE(obj) (CLASS_OF(obj) == rb_cNamespace)
```
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113493
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122366] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (2 preceding siblings ...)
2025-05-30 17:02 ` [ruby-core:122347] " fxn (Xavier Noria) via ruby-core
@ 2025-06-01 20:10 ` Eregon (Benoit Daloze) via ruby-core
2025-06-01 21:56 ` [ruby-core:122368] " baweaver (Brandon Weaver) via ruby-core
` (17 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Eregon (Benoit Daloze) via ruby-core @ 2025-06-01 20:10 UTC (permalink / raw)
To: ruby-core; +Cc: Eregon (Benoit Daloze)
Issue #21385 has been updated by Eregon (Benoit Daloze).
Agreed naming this new feature `Namespace` is very confusing and misleading.
`isolates` doesn't sound right because they are not really isolated.
I think `Context` would be fine.
TruffleRuby has a similar feature called `InnerContext` (except those have separate heaps and are more like multiple interpreters + easy communication (notably enables passing an object from a context to another), but on a high semantics level it is very similar).
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113511
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122368] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (3 preceding siblings ...)
2025-06-01 20:10 ` [ruby-core:122366] " Eregon (Benoit Daloze) via ruby-core
@ 2025-06-01 21:56 ` baweaver (Brandon Weaver) via ruby-core
2025-06-01 23:46 ` [ruby-core:122370] " duerst via ruby-core
` (16 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: baweaver (Brandon Weaver) via ruby-core @ 2025-06-01 21:56 UTC (permalink / raw)
To: ruby-core; +Cc: baweaver (Brandon Weaver)
Issue #21385 has been updated by baweaver (Brandon Weaver).
Some other ideas:
* Package - Some conflict with Packwerk, but then again would likely be used with it very quickly.
* Capsule - Similar to Package
* Realm - Bit Tolkien-esque, but no significant precedence in Ruby of this name being used.
* Zone - Similar implications as Realm, but a bit less archaic.
Personally fond of Package, as it encapsulates a lot of what we would want out of such a feature, and also aligns with common tool usage that would be likely to leverage such features.
Context can be mixed with RSpec a bit, but probably not a _huge_ issue.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113513
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122370] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (4 preceding siblings ...)
2025-06-01 21:56 ` [ruby-core:122368] " baweaver (Brandon Weaver) via ruby-core
@ 2025-06-01 23:46 ` duerst via ruby-core
2025-06-02 5:51 ` [ruby-core:122376] " fxn (Xavier Noria) via ruby-core
` (15 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: duerst via ruby-core @ 2025-06-01 23:46 UTC (permalink / raw)
To: ruby-core; +Cc: duerst
Issue #21385 has been updated by duerst (Martin Dürst).
I strongly support this proposal. It would avoid a lot of confusion down the line. Ideally, we would use a term that makes it clear that this is something much more wide-reaching, and something that's supposed to be much more rarely used, than your everyday namespace facility that Ruby provides with modules.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113514
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122376] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (5 preceding siblings ...)
2025-06-01 23:46 ` [ruby-core:122370] " duerst via ruby-core
@ 2025-06-02 5:51 ` fxn (Xavier Noria) via ruby-core
2025-06-03 1:31 ` [ruby-core:122383] " hsbt (Hiroshi SHIBATA) via ruby-core
` (14 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: fxn (Xavier Noria) via ruby-core @ 2025-06-02 5:51 UTC (permalink / raw)
To: ruby-core; +Cc: fxn (Xavier Noria)
Issue #21385 has been updated by fxn (Xavier Noria).
When I explain the feature a concept that I use naturally is "execution context". Like, "foo.rb runs in its own execution context, and that is set externally, foo.rb is not aware of it."
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113522
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122383] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (6 preceding siblings ...)
2025-06-02 5:51 ` [ruby-core:122376] " fxn (Xavier Noria) via ruby-core
@ 2025-06-03 1:31 ` hsbt (Hiroshi SHIBATA) via ruby-core
2025-06-03 15:30 ` [ruby-core:122396] " cheba (Alexander Mankuta) via ruby-core
` (13 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2025-06-03 1:31 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #21385 has been updated by hsbt (Hiroshi SHIBATA).
FYI: `Context` is conflict with Mastodon.
https://github.com/mastodon/mastodon/blob/main/app/models/context.rb#L3
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113530
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122396] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (7 preceding siblings ...)
2025-06-03 1:31 ` [ruby-core:122383] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2025-06-03 15:30 ` cheba (Alexander Mankuta) via ruby-core
2025-06-05 4:23 ` [ruby-core:122418] " matz (Yukihiro Matsumoto) via ruby-core
` (12 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: cheba (Alexander Mankuta) via ruby-core @ 2025-06-03 15:30 UTC (permalink / raw)
To: ruby-core; +Cc: cheba (Alexander Mankuta)
Issue #21385 has been updated by cheba (Alexander Mankuta).
hsbt (Hiroshi SHIBATA) wrote in #note-9:
> FYI: `Context` is conflict with Mastodon.
I’m fairly confident we can find at least 2 instances of `Namespace` in the wild.
I don’t think this argument has much weight.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113566
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122418] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (8 preceding siblings ...)
2025-06-03 15:30 ` [ruby-core:122396] " cheba (Alexander Mankuta) via ruby-core
@ 2025-06-05 4:23 ` matz (Yukihiro Matsumoto) via ruby-core
2025-06-05 4:45 ` [ruby-core:122423] " matz (Yukihiro Matsumoto) via ruby-core
` (11 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: matz (Yukihiro Matsumoto) via ruby-core @ 2025-06-05 4:23 UTC (permalink / raw)
To: ruby-core; +Cc: matz (Yukihiro Matsumoto)
Issue #21385 has been updated by matz (Yukihiro Matsumoto).
Context, Capsule, Realm, and Zone do not seem to represent namespaces, so I don't want to adopt them (although I like those names). I like the name Package too. But I think we should reserve it for high-level APIs.
FYI, I consider this namespace thing as a low level API. And I have a plan to provide higher level API in the future.
Matz.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113598
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122423] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (9 preceding siblings ...)
2025-06-05 4:23 ` [ruby-core:122418] " matz (Yukihiro Matsumoto) via ruby-core
@ 2025-06-05 4:45 ` matz (Yukihiro Matsumoto) via ruby-core
2025-06-05 5:19 ` [ruby-core:122425] " fxn (Xavier Noria) via ruby-core
` (10 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: matz (Yukihiro Matsumoto) via ruby-core @ 2025-06-05 4:45 UTC (permalink / raw)
To: ruby-core; +Cc: matz (Yukihiro Matsumoto)
Issue #21385 has been updated by matz (Yukihiro Matsumoto).
I have to make myself clear. It's fine for me, if we rename Namespace.
Matz.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113603
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122425] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (10 preceding siblings ...)
2025-06-05 4:45 ` [ruby-core:122423] " matz (Yukihiro Matsumoto) via ruby-core
@ 2025-06-05 5:19 ` fxn (Xavier Noria) via ruby-core
2025-06-05 7:49 ` [ruby-core:122430] " byroot (Jean Boussier) via ruby-core
` (9 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: fxn (Xavier Noria) via ruby-core @ 2025-06-05 5:19 UTC (permalink / raw)
To: ruby-core; +Cc: fxn (Xavier Noria)
Issue #21385 has been updated by fxn (Xavier Noria).
Oh, it is interesting to know there's a higher level API in the horizon. Looking forward to see what you have in mind!
With that new context, a "cell" is a low-level thing with inner/independent activity, but it is permeable and can communicate with the exterior. As a metaphor maybe it could match. (Potential name conflicts aside.)
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113605
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122430] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (11 preceding siblings ...)
2025-06-05 5:19 ` [ruby-core:122425] " fxn (Xavier Noria) via ruby-core
@ 2025-06-05 7:49 ` byroot (Jean Boussier) via ruby-core
2025-06-05 8:45 ` [ruby-core:122436] " Eregon (Benoit Daloze) via ruby-core
` (8 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: byroot (Jean Boussier) via ruby-core @ 2025-06-05 7:49 UTC (permalink / raw)
To: ruby-core; +Cc: byroot (Jean Boussier)
Issue #21385 has been updated by byroot (Jean Boussier).
Regarding the name conflict, if this is meant as a low level API, we could consider something under the newly introduced `Ruby` module. E.g. `Ruby::Context`, `Ruby::Namespace`, etc etc.
This also doesn't prevent deprecating the use of the equivalent top-level constant name for a potential alias in the future if that is desired.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113611
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122436] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (12 preceding siblings ...)
2025-06-05 7:49 ` [ruby-core:122430] " byroot (Jean Boussier) via ruby-core
@ 2025-06-05 8:45 ` Eregon (Benoit Daloze) via ruby-core
2025-06-05 9:31 ` [ruby-core:122447] " ko1 (Koichi Sasada) via ruby-core
` (7 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Eregon (Benoit Daloze) via ruby-core @ 2025-06-05 8:45 UTC (permalink / raw)
To: ruby-core; +Cc: Eregon (Benoit Daloze)
Issue #21385 has been updated by Eregon (Benoit Daloze).
From the latest suggestions, I think `Realm` and `Context` are the best, since the feature about creating multiple sets of top-level constants/isolating them.
Since it is a low-level API I think nesting under `Ruby::` would be good, and that avoids the conflicts as in #21341.
I would say this feature isn't about namespaces, it's about semantically having a separate `Object` class and everything referenced from it.
IOW, it's quite similar to creating a clean new Ruby interpreter with no visible sharing.
The sharing is only an internal optimization/implementation detail, it should be transparent, if it's not it's a bug (because it then breaks the isolation and likely the use cases of this feature).
In fact I think we should support implementations of this feature which do not use any internal sharing, so this feature could e.g. also be supported on TruffleRuby by using subinterpreters under the hood.
Additionally this feature also supports communication and cross-references, that's also possible with subinterpreters (e.g. by proxying calls).
From this high-level description I think it's clear `Realm` and `Context` are good names for this feature.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113617
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122447] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (13 preceding siblings ...)
2025-06-05 8:45 ` [ruby-core:122436] " Eregon (Benoit Daloze) via ruby-core
@ 2025-06-05 9:31 ` ko1 (Koichi Sasada) via ruby-core
2025-06-06 1:53 ` [ruby-core:122476] " ioquatix (Samuel Williams) via ruby-core
` (6 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: ko1 (Koichi Sasada) via ruby-core @ 2025-06-05 9:31 UTC (permalink / raw)
To: ruby-core; +Cc: ko1 (Koichi Sasada)
Issue #21385 has been updated by ko1 (Koichi Sasada).
other ideas:
* NameSpace (from ObjectSpace)
* NameCapsule
* RootNamespace
* ModuleGroup
* ModuleBag
* ModuleSpace (by ledsun)
(Namespace also separates global variables though)
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113628
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122476] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (14 preceding siblings ...)
2025-06-05 9:31 ` [ruby-core:122447] " ko1 (Koichi Sasada) via ruby-core
@ 2025-06-06 1:53 ` ioquatix (Samuel Williams) via ruby-core
2025-06-06 7:32 ` [ruby-core:122478] " hsbt (Hiroshi SHIBATA) via ruby-core
` (5 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: ioquatix (Samuel Williams) via ruby-core @ 2025-06-06 1:53 UTC (permalink / raw)
To: ruby-core; +Cc: ioquatix (Samuel Williams)
Issue #21385 has been updated by ioquatix (Samuel Williams).
`Ruby::Context` sounds good to me!
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113665
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122478] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (15 preceding siblings ...)
2025-06-06 1:53 ` [ruby-core:122476] " ioquatix (Samuel Williams) via ruby-core
@ 2025-06-06 7:32 ` hsbt (Hiroshi SHIBATA) via ruby-core
2025-06-09 11:28 ` [ruby-core:122495] " nobu (Nobuyoshi Nakada) via ruby-core
` (4 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2025-06-06 7:32 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #21385 has been updated by hsbt (Hiroshi SHIBATA).
* Space
* Verse
* Scope
* ClassLoader (joke)
* Classbox
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113667
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122495] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (16 preceding siblings ...)
2025-06-06 7:32 ` [ruby-core:122478] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2025-06-09 11:28 ` nobu (Nobuyoshi Nakada) via ruby-core
2025-06-09 16:43 ` [ruby-core:122498] " Dan0042 (Daniel DeLorme) via ruby-core
` (3 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2025-06-09 11:28 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #21385 has been updated by nobu (Nobuyoshi Nakada).
* World
* NamaeSpace (namae is name in Japanese ;-)
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113686
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122498] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (17 preceding siblings ...)
2025-06-09 11:28 ` [ruby-core:122495] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2025-06-09 16:43 ` Dan0042 (Daniel DeLorme) via ruby-core
2025-06-09 17:06 ` [ruby-core:122499] " opswole (Christopher Fagg) via ruby-core
` (2 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Dan0042 (Daniel DeLorme) via ruby-core @ 2025-06-09 16:43 UTC (permalink / raw)
To: ruby-core; +Cc: Dan0042 (Daniel DeLorme)
Issue #21385 has been updated by Dan0042 (Daniel DeLorme).
For me "context" means something like `context = binding.eval("self")`, so I can't say I like `Context` very much for this. Actually none of the one-word suggestions sound quite right to me; they're either too generic or too cryptic.
I think that `Namespace` is not such a bad name; classes loaded in one are not visible to the others, it really is a space for names, a namespace. It's just not a named namespace like classes and modules (assuming that #21316 is fixed). But the fact that core classes are "forked" in each namespace is something that the word `Namespace` doesn't convey. So yes it's a space for names, but not merely that.
I think "sandbox" is really a descriptive word here, and btw I disagree that it must necessarily have a security connotation.
`Ruby::NameSandbox` ?
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113691
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122499] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (18 preceding siblings ...)
2025-06-09 16:43 ` [ruby-core:122498] " Dan0042 (Daniel DeLorme) via ruby-core
@ 2025-06-09 17:06 ` opswole (Christopher Fagg) via ruby-core
2025-06-09 17:12 ` [ruby-core:122500] " masterleep2 (Bill Lipa) via ruby-core
2025-06-13 17:23 ` [ruby-core:122525] " Eregon (Benoit Daloze) via ruby-core
21 siblings, 0 replies; 23+ messages in thread
From: opswole (Christopher Fagg) via ruby-core @ 2025-06-09 17:06 UTC (permalink / raw)
To: ruby-core; +Cc: opswole (Christopher Fagg)
Issue #21385 has been updated by opswole (Christopher Fagg).
I'd like to throw Sector into the mix.
Namespaces are defined as being "designed to provide separated spaces in a Ruby process, to isolate applications and libraries."
A sector is defined as "an area or portion that is distinct from others".
I can't seem to find any other reference to Sector(s) in Ruby so I don't think it'd clash with anything.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113692
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122500] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (19 preceding siblings ...)
2025-06-09 17:06 ` [ruby-core:122499] " opswole (Christopher Fagg) via ruby-core
@ 2025-06-09 17:12 ` masterleep2 (Bill Lipa) via ruby-core
2025-06-13 17:23 ` [ruby-core:122525] " Eregon (Benoit Daloze) via ruby-core
21 siblings, 0 replies; 23+ messages in thread
From: masterleep2 (Bill Lipa) via ruby-core @ 2025-06-09 17:12 UTC (permalink / raw)
To: ruby-core; +Cc: masterleep2 (Bill Lipa)
Issue #21385 has been updated by masterleep2 (Bill Lipa).
* Shard - from MMOs - also has the connotation that using this feature carelessly could result in hurting yourself
* Isolator
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113693
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
* [ruby-core:122525] [Ruby Misc#21385] Namespace: Suggesting a rename
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
` (20 preceding siblings ...)
2025-06-09 17:12 ` [ruby-core:122500] " masterleep2 (Bill Lipa) via ruby-core
@ 2025-06-13 17:23 ` Eregon (Benoit Daloze) via ruby-core
21 siblings, 0 replies; 23+ messages in thread
From: Eregon (Benoit Daloze) via ruby-core @ 2025-06-13 17:23 UTC (permalink / raw)
To: ruby-core; +Cc: Eregon (Benoit Daloze)
Issue #21385 has been updated by Eregon (Benoit Daloze).
hsbt (Hiroshi SHIBATA) wrote in #note-19:
> ClassLoader (joke)
I'm not sure how I missed this but indeed this feature seems very much like Java's ClassLoader,
i.e., a way to load files/"features"/modules/classes again in their own isolated top-level namespace (semantically a copy of `Object` except it shares identity).
Java doesn't have monkey-patching so there is no need for the COW handling on core classes (in Java terms for classes loaded by the bootstrap classloader).
`ClassLoader` wouldn't be a good name for Ruby though, because `require` loads files/features, not classes.
Maybe `FileLoader` or `FeatureLoader` (which BTW are names already used internally exactly for this stuff in TruffleRuby and also in Rubinius IIRC).
ko1 (Koichi Sasada) wrote in #note-17:
> RootNamespace
I think this is good as `RootNamespace.new` expresses clearly and fairly faithfully what the feature does.
IMO it's best to avoid any term related to isolation or security for this feature since there is little isolation in this feature:
the only isolation is separate top-level constant namespaces, separate global variables, and the lazy copy of core classes.
But different "namespaces" can refer to each other and even mutate each other, hence no isolation.
----------------------------------------
Misc #21385: Namespace: Suggesting a rename
https://bugs.ruby-lang.org/issues/21385#change-113750
* Author: fxn (Xavier Noria)
* Status: Open
----------------------------------------
I'd like to suggest a rename of namespaces.
The word "namespace" is already taken in Ruby.
We say that classes and modules act as or represent namespaces. Constant paths nest them in practice. We say that it is a best practice that gems create their own namespace, etc.
If the feature goes ahead with this name, the above sentences, well-established in the Ruby community, will start to sound confusing, because that meaning of "namespace" stays.
If you look at the index in Matz's book, "namespaces" is indexed in pages 248–250. Title of section 7.5.1 is "Modules as Namespaces".
Besides, I have had a few experiences explaining the proposal to people, and quickly realizing they assume this is something like C++ namespaces or Java packages. Then, I have to undo that mental model and start all over saying "forget that mental model". Those are like our constant paths, only more simple and strict. I think it may also be confusing in this sense (though this could be OK if it wasn't for the previous point.)
To be constructive: Some alternative names that I have thought about are "isolates", "shields", or "cells". ("sandboxes" is close, but may have security connotations you do not want to suggest.)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2025-06-13 17:24 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-30 15:46 [ruby-core:122343] [Ruby Misc#21385] Namespace: Suggesting a rename fxn (Xavier Noria) via ruby-core
2025-05-30 15:47 ` [ruby-core:122344] " fxn (Xavier Noria) via ruby-core
2025-05-30 16:37 ` [ruby-core:122346] " matheusrich (Matheus Richard) via ruby-core
2025-05-30 17:02 ` [ruby-core:122347] " fxn (Xavier Noria) via ruby-core
2025-06-01 20:10 ` [ruby-core:122366] " Eregon (Benoit Daloze) via ruby-core
2025-06-01 21:56 ` [ruby-core:122368] " baweaver (Brandon Weaver) via ruby-core
2025-06-01 23:46 ` [ruby-core:122370] " duerst via ruby-core
2025-06-02 5:51 ` [ruby-core:122376] " fxn (Xavier Noria) via ruby-core
2025-06-03 1:31 ` [ruby-core:122383] " hsbt (Hiroshi SHIBATA) via ruby-core
2025-06-03 15:30 ` [ruby-core:122396] " cheba (Alexander Mankuta) via ruby-core
2025-06-05 4:23 ` [ruby-core:122418] " matz (Yukihiro Matsumoto) via ruby-core
2025-06-05 4:45 ` [ruby-core:122423] " matz (Yukihiro Matsumoto) via ruby-core
2025-06-05 5:19 ` [ruby-core:122425] " fxn (Xavier Noria) via ruby-core
2025-06-05 7:49 ` [ruby-core:122430] " byroot (Jean Boussier) via ruby-core
2025-06-05 8:45 ` [ruby-core:122436] " Eregon (Benoit Daloze) via ruby-core
2025-06-05 9:31 ` [ruby-core:122447] " ko1 (Koichi Sasada) via ruby-core
2025-06-06 1:53 ` [ruby-core:122476] " ioquatix (Samuel Williams) via ruby-core
2025-06-06 7:32 ` [ruby-core:122478] " hsbt (Hiroshi SHIBATA) via ruby-core
2025-06-09 11:28 ` [ruby-core:122495] " nobu (Nobuyoshi Nakada) via ruby-core
2025-06-09 16:43 ` [ruby-core:122498] " Dan0042 (Daniel DeLorme) via ruby-core
2025-06-09 17:06 ` [ruby-core:122499] " opswole (Christopher Fagg) via ruby-core
2025-06-09 17:12 ` [ruby-core:122500] " masterleep2 (Bill Lipa) via ruby-core
2025-06-13 17:23 ` [ruby-core:122525] " Eregon (Benoit Daloze) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).