On Friday, 13 March 2015 at 22:14:45 UTC, Walter Bright wrote:
On 3/13/2015 12:01 PM, weaselcat wrote:
On Friday, 13 March 2015 at 18:55:18 UTC, Walter Bright wrote:
On 3/13/2015 3:34 AM, bearophile wrote:
"Strict mode" is a D2 with immutable+@safe+pure by default,

Note that you can get this largely by starting a module with the following:

  immutable @safe pure:


As far as I'm aware, there's no way to mark functions impure this way other than
lexical location. Am I incorrect?

You are correct, which is why D also supports:

   immutable @safe pure {
      ... nice declarations ...
   }

   ... naughty declarations ...

But most prefer labels. Did you dislike things like 'pure(false)' or' default:'? Just out of interest, since it is a bit offtopic.

Reply via email to