October 11, 2012
On 2012-10-11 19:21, Alex Rønne Petersen wrote:

> 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.

This list starts to get fairly long. Would there be a point of adding this to dlang.org, somewhere?

-- 
/Jacob Carlborg
October 11, 2012
On Thursday, 11 October 2012 at 18:41:14 UTC, Maxim Fomin wrote:
> On Thursday, 11 October 2012 at 18:20:27 UTC, monarch_dodra wrote:
>> In C, *technically*, anything ending in _t is reserved for future
>> usage, but this is not enforced.
>
> Where this is claimed?

I seem to have been... "inaccurate" in my claim. This is actually a POSIX restriction, not an ISO C one.

http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
October 11, 2012
On Thursday, October 11, 2012 21:00:58 Jacob Carlborg wrote:
> This list starts to get fairly long. Would there be a point of adding this to dlang.org, somewhere?

A lot of it is there already: http://dlang.org/phobos/object.html

- Jonathan M Davis
October 11, 2012
On Thursday, 11 October 2012 at 07:00:10 UTC, Jacob Carlborg 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?

From druntime: one underscore + lower letter: http://pastebin.com/iztLZh4m. I guess parsing for double underscores and one underscore + upper letter is meaningless, since defining such identifiers is looking for problems anyway.
October 11, 2012
On 11-10-2012 20:55, Ali Çehreli wrote:
> On 10/11/2012 11:52 AM, Alex Rønne Petersen wrote:
>> On 11-10-2012 20:41, Maxim Fomin wrote:
>>> On Thursday, 11 October 2012 at 18:20:27 UTC, monarch_dodra wrote:
>>>> In C, *technically*, anything ending in _t is reserved for future
>>>> usage, but this is not enforced.
>>>
>>> Where this is claimed?
>>>
>>>
>>
>> 6.10.7.2:
>>
>> None of these macro names, nor the identifier defined, shall be the
>> subject of a #define or a #undef preprocessing directive. Any other
>> predefined macro names shall begin with a leading underscore followed by
>> an uppercase letter or a second underscore.
>>
>> So, it's not explicitly reserved, but your code can suddenly start doing
>> weird things if you prefix an identifier with an underscore.
>>
>> This is why new keywords/types are named like _Noreturn, _Thread_local,
>> etc.
>>
>
> I am sure Maxim knows about the "leading underscore" case. I think
> that's why "anything ending in _t" is being questioned. :)
>
> I would like to know that too. I have never heard that names ending with
> _t are reserved in C or C++.
>
> Ali

Aaah, my bad. I somehow completely missed the _t.

Disregard me!

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
October 12, 2012
On 2012-10-11 21:28, Jonathan M Davis wrote:

> A lot of it is there already: http://dlang.org/phobos/object.html

I wouldn't count that list. I'm thinking more something that explicitly says: "These are reserved symbols by the language or the runtime".

Creating your own function named "assumeSafeAppend" actually works fine. On the other hand, naming a module "object" is known to cause Bad Things to happen. So there are some differences.

-- 
/Jacob Carlborg
1 2 3
Next ›   Last »