Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #8548
| Message-ID | <4e3d8b2b$1@news.x-privat.org> (permalink) |
|---|---|
| Newsgroups | comp.lang.c++, comp.std.c++, comp.lang.c++.moderated |
| From | Phil Bouchard <philippe@fornux.com> |
| Subject | New syntax proposal for attributes |
| Organization | X-Privat.Org NNTP Server - http://www.x-privat.org |
| Date | 2011-08-07 13:08 -0600 |
Cross-posted to 3 groups.
Hello,
The new syntax for attributes is horrifying and I would like to
propose a new one which is very neat.
Instead of:
class [[base_check, align(16)]] D : public B {
public:
virtual void f [[override, nodebug]] ();
virtual int g [[final, noexcept]] (int);
virtual void h [[hiding]] ();
};
Why not:
class D = base_check, align(16) : public B {
public:
virtual void f() = override, nodebug;
virtual int g(int) = final, noexcept;
virtual void h() = hiding;
};
This is much more readable and is consistent with the "= delete"
compile-time property as well.
-Phil
--
[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.lang.c++ | Previous | Next — Next in thread | Find similar | Unroll thread
New syntax proposal for attributes Phil Bouchard <philippe@fornux.com> - 2011-08-07 13:08 -0600
Re: New syntax proposal for attributes Francis Glassborow <francis.glassborow@btinternet.com> - 2011-08-07 17:58 -0600
Re: New syntax proposal for attributes DeMarcus <use_my_alias_here@hotmail.com> - 2011-08-08 12:00 -0600
Re: New syntax proposal for attributes Phil Bouchard <philippe@fornux.com> - 2011-08-08 23:55 -0600
Re: New syntax proposal for attributes BGB <cr88192@hotmail.com> - 2011-08-08 23:54 -0600
csiph-web