List of reserved words

Alex Rønne Petersen alex at lycus.org
Thu Oct 11 10:21:38 PDT 2012


On 11-10-2012 13:00, Iain Buclaw wrote:
> On 11 October 2012 07:36, Jacob Carlborg <doob at me.com> wrote:
>> On dlang.org there's a page containing all the keywords, which are reserved:
>>
>> http://dlang.org/lex.html
>>
>> But it would also be nice to have a list of words/symbols that are not
>> keywords but could otherwise be thought of being reserved. These are words
>> that will make it problematic if used in user code in the wrong context. I
>> thinking mostly of naming a module "object" or a class "Object", the
>> compiler will not be happy seeing that.
>>
>> What other "reserved" words like these does D have?
>>
>> --
>> /Jacob Carlborg
>
> Pick your list from object.d:
>
> Object
> Throwable
> Exception
> Error
> ClassInfo
> ModuleInfo
> TypeInfo
> TypeInfo_Class
> TypeInfo_Interface
> TypeInfo_Struct
> TypeInfo_Typedef
> TypeInfo_Pointer
> TypeInfo_Array
> TypeInfo_AssociativeArray
> TypeInfo_Enum
> TypeInfo_Function
> TypeInfo_Delegate
> TypeInfo_Tuple
> TypeInfo_Const
> TypeInfo_Invariant
> TypeInfo_Shared
> TypeInfo_Wild
> TypeInfo_Vector
>
>

It's Classinfo by the way (for whatever reason...).

Some more:

AssociativeArray
OffsetTypeInfo
MemberInfo
MemberInfo_field
MemberInfo_function
_dg_t
_dg2_t

Functions:

opEquals (there's a global function)
setSameMutex
_aaLen
_aaGet
_aaGetRvalue
_aaIn
_aaDel
_aaValues
_aaKeys
_aaRehash
_aaApply
_aaApply2
_d_assocarrayliteralT
destroy
clear
capacity
reserve
assumeSafeAppend
_ArrayEq
_xopEquals
__ctfeWrite
__ctfeWriteln

Templates:

_isStaticArray
RTInfo

I think that's about it.

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d mailing list