Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

null_pointer

Poll: What would you add to C++?

This topic is 5575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
- "proper" Interfaces (probably COM-style, but without the #define hacks)
- support for template variable/function names based on types (things like T $TArray_[4] which would expand to int intArray_[4])
- partial function specialisation

Share this post


Link to post
Share on other sites
Actually, this is an addition to the editor:

Auto-listing of available enumerated types when typing function parameters. (I don't have VS 7.0, is that in there yet?)

[edited by - Waverider on January 22, 2003 10:38:35 AM]

Share this post


Link to post
Share on other sites
quote:
i''d learn it properly before making any suggestions


I do not think that it would be possible to introduce automatic learning into a programming language. *scratches head* Do you have any other features that you would like to see in C++?

quote:
- "proper" Interfaces (probably COM-style, but without the #define hacks)
- support for template variable/function names based on types (things like T $TArray_[4] which would expand to int intArray_[4])
- partial function specialisation


They all sound interesting, but I am not sure I understand some of them. What do you mean by proper interfaces and partial function specialization? What situations have you come across in which these features would be useful? Could you provide a few bits of psuedo-code to illustrate how you would like to see them defined?

quote:
Auto-listing of available enumerated types when typing function parameters. (I don''t have VS 7.0, is that in there yet?)


I like that idea. I have often wondered, though, whether there might not be a better way of handling what enumerations do... Oh, well, more to speculate upon...

Share this post


Link to post
Share on other sites
Fix everything at http://anubis.dkuug.dk/jtc1/sc22/wg21/

My personal irritants
- non standardized compiler name mangling
- remove C compatibility (this would solve a huge set of problems)

Share this post


Link to post
Share on other sites
quote:
Original post by Prototype
The ''with'' keyword.
It''s a shame it isn''t there.

No it isn''t. It monkeys around with scope in a manner which can cause problems. Imagine this hypothetical code:


  
struct student
{
int age;
string first_name;
string second_name;
};

int main()
{
student s;
with s
{
age = 18;
first_name = "Sabre";
second_name = "Man";
}
}


This is all fine and dandy, and quite appealing to those who are concerned with programming in the small who don''t think about large-scale implications. However, when you make changes to the student struct, you introduce the possibility of shadowing something from an outer scope in a way which causes subtle bugs. What was a reference to a variable in an outer scope suddenly becomes a reference to something in the scope of s. Oops!

Share this post


Link to post
Share on other sites
quote:
Original post by null_pointer
What features would you add to the C++ programming language?

Sanity. But, knowing that''s a bit far-fetched, perhaps these would make C++ a bit more comfortable...

- multimethods;
- type inference (it won''t happen);
- classes and functions as first-class types;
- ability to yield a symbol given a string;
- default initialisation of PODs is zero-initialisation;
- defined order of evaluation between sequence-points.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!