473,484 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

The IDE feature that VC++ Needs... #region and #endregion

I was thinking about what IDE feature I would want the most in the next
version of VC++?

I would definately ask for the C# feature: #region / #endregion.
In my opinion this feature was a brilliant idea.
This thing really helps to abstract out code, and gives you a view of your
code you can not otherwise see.

C++ needs this feature even more so than C#, because C++'s code can become
much more complex.

Pretty please... can we have this in C++?

Does anyone else agree with me?

Russell Mangel
Las Vegas, NV

Nov 17 '05 #1
7 3367
Russell Mangel wrote:
I was thinking about what IDE feature I would want the most in the
next version of VC++?

I would definately ask for the C# feature: #region / #endregion.
This isn't strictly an IDE feature, although IDE support would presubably be
needed to make it useful.
In my opinion this feature was a brilliant idea.
This thing really helps to abstract out code, and gives you a view of
your code you can not otherwise see.
Adding #region / #endregion directives would make code using these directives
uncompilable on other compilers. The usual way to get around this wouldn't work,
since

#ifdef _MSC_VER
# region
#endif

is incorrectly nested.

The C++ way to introduce this feature would be #pragma region/endregion. This
would still yield a lot of unrecognized pragma warnings, which I personally
would find very annoying.
Pretty please... can we have this in C++?

Does anyone else agree with me?


Not me.

Jonathan
Nov 17 '05 #2
Jonathan,
The C++ way to introduce this feature would be #pragma region/endregion. This would still yield a lot of unrecognized pragma warnings, which I personally would find very annoying.


#pragma region and #pragma endregion are already supported by the VS2005 ide
(at least in beta1) and they do not generate unrecognized pragma warnings by
the compiler.

--
Tomas Restrepo
to****@mvps.org
Nov 17 '05 #3
Tomas Restrepo (MVP) wrote:
Jonathan,
The C++ way to introduce this feature would be #pragma
region/endregion. This would still yield a lot of unrecognized
pragma warnings, which I personally would find very annoying.
#pragma region and #pragma endregion are already supported by the
VS2005 ide (at least in beta1)


I didn't know this.
and they do not generate unrecognized
pragma warnings by the compiler.


I'm talking about non-microsoft compilers.

Jonathan
Nov 17 '05 #4
Oh my! It works!

Yippeeeeeeeeeeeeee!

My favorite feature!

Give the MS VC VS2005 team a box of candy bars, and a big raise.

Russell Mangel
Las Vegas, NV

Nov 17 '05 #5
Always somebody working on something...

So now that we both learned something, do you think this is useful?
If not, why?

Russell Mangel
Las Vegas, NV
Nov 17 '05 #6
I gather you're talking to me.

Russell Mangel wrote:
Always somebody working on something...
??
So now that we both learned something, do you think this is useful?
If not, why?
As I said before, #pragma region leads to 'unrecognized pragma' warnings on
compilers which don't support the pragma. But I see they chose to relax the
restrictions on nesting, so I can write something like

#ifdef _MSC_VER
#pragma region
#endif

I really don't see the great benefit. After all, we have classes and namespaces
to partition our code, and comments to annotate it. Splitting enormous files
into smaller ones also helps.
Russell Mangel
Las Vegas, NV


Jonathan
Nov 17 '05 #7
Russell Mangel wrote:

Always somebody working on something...

So now that we both learned something, do you think this is useful?
If not, why?

Russell Mangel
Las Vegas, NV


I used to think that (C#) #regions were a great thing. However, after a year+
of using them, I no longer like/use them. They make navigation too difficult
(nested regions, regions to large, maintenance, etc.). If I can't locate what
I need in a file, then there is probably something else wrong and it should be
seriously looked at (i.e. refactored).

In short, I've found #regions to be a bad way to hide bad code design and
unwarranted complexity.
Nov 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
7559
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
1
331
by: AndreB | last post by:
Hello, I think it would be so useful to be able to expand or collapse the "#endregion" in the same way it is possible with "-" and "+" in front of "#region". It will be easy to shorten a region...
6
1911
by: John | last post by:
I have two books saying different things about the #region directive. One says that all code within #region does not affect the compilation process in any way, while the other states that the...
7
3680
by: Osvaldo Bisignano | last post by:
I want to generate #region #endregion statements through codedom.
12
1332
by: clintonG | last post by:
VS2005 2.0 Beta 2 noting I've posted (to no avail so far) to the somewhat deadzone at news://microsoft.public.vsnet.ide and am getting ants in my pants for some discussion about this issue. ...
4
8673
by: Lonewolf | last post by:
Hi in C#, it is possible to define a region which can be tucked away in the IDE by defining a #region and #endregion pair in the code. I realize this does not seem to work for C++/CLI, be it...
2
7015
by: keithb | last post by:
What is the meaning of #region #endregion
2
2271
by: =?Utf-8?B?U2VlU2hhcnA=?= | last post by:
It seems I cannot use #region and #endregion to hide those auto generated windows form control declarations. They are available in VC# 2003 though. Is it true that VC 2003 doesn't support #region...
4
2688
by: Tony Johansson | last post by:
Hello! Below I have manually added the two statement #region Using directives and #endregion. I wonder if this possible to have the Visual studio 2005 to generate these two statement for those...
0
7080
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7103
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7209
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5403
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4841
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4527
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3044
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3038
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
588
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.