All function attributes possible with "@"?

01010100b via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 14 15:19:24 PST 2016


On Wednesday, 14 December 2016 at 21:44:40 UTC, David Gileadi 
wrote:
> I've noticed that recent languages like Go and Swift are trying 
> to have both by bundling a code fixer with new versions of 
> their language.

An automated code fixer in this case would be easy. Before 
looking up on the wiki why we couldn't do @pure @nogc func() I 
considered I could just add a pre-build step which does a string 
replacement on the source code from "@keyword" to "keyword" for 
each keyword which can be used as a function attribute.

Given a change to allowing "@keyword", existing source code would 
just need to be checked for containing "@keyword" and prompting 
to replace it with something else.


More information about the Digitalmars-d mailing list