Re: [rfc] Be in language c more c++ compatible

Matt Rice
2011-07-24T13:48:27Z

On Sun, Jul 24, 2011 at 5:52 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Sat, 23 Jul 2011 23:17:43 +0200, Matt Rice wrote:
>> was curious what it did with the attached objc++ version.
>>
>> which isn't really a supported language by any means.
>
> I think this is outside of the scope of this thread.
>

Yeah, I pretty much came to the same conclusion,
after stewing on it overnight
except as it relates to:

>>There was another mail about use case when you >>combine C/C++ application/libs.

since objc++ is typically used to bridge a c++ library with an
objective-c library, and not generally a language used to write in
directly. there is also more opportunity for 'set language', in both
languages with the current language being
objective-c and setting to c++, but also the current language being
c++ and wanting to be objective-c.

what made me think of it, is the last time I was debugging a mixed
c++/objective-c program, having to call 'set language', was extremely
annoying, to the point that I added commands to my .gdbinit to lighten
the churn.

define cp
set language c++
end

define oc
set language objective-c
end

and setting the language was mostly something done in response to some
failed command. Thus, I personally think anything that lessens the
amount of 'set language'ing is a good idea.