I would like to write an RFC for the addition of an internal keyword
Hi,
I just want to get a feel for whether the following idea would be instantly rejected (for example I
get the feeling that adding keywords is a big deal):
Often, when writing frameworks, you need to make public or protected functionality or classes which
should only be called from inside the framework. You CAN ensure this with a lot of ninja tricks and
debug_backtrace, but it is very cumbersome and often hides your methods and properties from class
signatures.
Therefore I would propose adding a C# style "internal" keyword. ( http://msdn.microsoft.com/en-us/library/7c5ka91b(v=vs.80).aspx
)
The idea is, simply, that functions, methods and classes marked as "internal" would only
be accessible from within the namespace in which they are defined.
For example the following class, "namespace Framework; internal class Something {}", would
only be visible from within the "Framework" namespace.
I have a hunch that this would be relatively easy to implement.
If noone objects I would attempt to create a patch and an RFC.
What do you think?
-Jens Riisom Schultz
Thread (16 messages)