digitalmars.D.learn - pure safe etc
- Michael (1/1) Jun 02 2013 Why pure is keyword, but @safe is attribute?
- Jonathan M Davis (12/13) Jun 02 2013 They're both function attributes. But pure is a keyword and safe got @ t...
On Sunday, June 02, 2013 10:52:14 Michael wrote:Why pure is keyword, but safe is attribute?They're both function attributes. But pure is a keyword and safe got tacked onto the front of it in order to avoid having to create a new keyword. Now, we have User Defined Attributes which also use , but that doesn't really have anything to do with safe or any of the other function attributes which start with save for the fact that a UDA obviously can't have the same name. safe could have just as easily been safe, and pure could just as easily have been pure. But it was arbitrarily chosen that pure didn't have and safe did. I believe that it's at least partially based on when they were added to the language, but it's ultimately arbitrary, and the fact that safe starts with means nothing. - Jonathan M Davis
Jun 02 2013