 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Frederick Gotham Guest
|
Posted: Wed Sep 13, 2006 9:10 am Post subject: Vote for Aggregate Initialiser Syntax |
|
|
I have set up an online poll:
http://snappoll.com/poll/130337.php
to ask C++ programmers whether they want aggregate initialiser syntax to be
added to the Standard. Here's is how it works:
struct MyAgg { int a; double b; };
class MyClass {
private:
int const arr[3];
MyAgg agg;
public:
MyClass(int const a,int const b,int const c)
: arr( {a,b,c} ), agg( {b, c * 5.4} )
{
/* Function Body */
}
};
And also:
int *const p = new int[3]({5,4,3});
MyAgg *const p = new MyAgg({3,56.3});
The reason I set up the poll is to possibly demonstrate to the Standards
Committee that programmers feel that this is a fundamental programming
function, and should be provided by the language. (They haven't paid much
attention to the request of late).
--
Frederick Gotham
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Francis Glassborow Guest
|
Posted: Wed Sep 13, 2006 2:35 pm Post subject: Re: Vote for Aggregate Initialiser Syntax |
|
|
In article <x%INg.13657$j7.330154 (AT) news (DOT) indigo.ie>, Frederick Gotham
<fgothamNO (AT) SPAM (DOT) com> writes
| Quote: | The reason I set up the poll is to possibly demonstrate to the Standards
Committee that programmers feel that this is a fundamental programming
function, and should be provided by the language. (They haven't paid much
attention to the request of late).
Please take the time to read the papers already on the table about |
initialisation. Bjarne Stroustrup, Lois Goldthwaite, Gabriel Dos Reis
and I are all involved in the issue. What we are currently working on
is far ahead of what you are suggesting and considers many more aspects
of initialisation than your proposals.
--
Francis Glassborow ACCU
Author of 'You Can Do It!' and "You Can Program in C++"
see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|