Home Download Buy Blog Forum Support

C++ Parsing Errors

C++ Parsing Errors

Postby ctartamella on Fri Jan 18, 2013 3:48 am

I have noticed a few issues with C++ parsing. First, the actual bug. Methods formatted as follows do not get parsed properly:

int TestClass::TestMethod
(
int param1,
char param2
)
{

}

This is the coding standard my company follows, so nothing I can do about it. I've tested it and it seems to be the newlines that cause the parsing issue. The second issue is potentially a new feature, but one that is important on the Windows platform. The parser has no idea how to handle C++/CLI (the .NET bastardization of C++). As soon as a ref class is seen, parsing is unable to handle it. Would there be any way to get this added in?

Thanks in advance.
ctartamella
 
Posts: 4
Joined: Fri Nov 02, 2012 7:55 pm

Re: C++ Parsing Errors

Postby amphetamine on Fri Jan 18, 2013 11:26 am

(a) The ST2 C++ syntax definition has a number of notable bugs. In fact, once you scratch under the surface even a little bit, almost none of the more arcane concepts work properly. Although that coding style is definitely a bit odd, it's not illegal so it should still be supported by Sublime. Unfortunately, it's one of those things where unless you have the know-how and the motivation to get your hands dirty fixing it yourself, you just have to wait and hope someone else does.

(b) C++ CLR should not be a priority at all, I wouldn't say it was important in the slightest. It's a fucked up, worst-of-both-worlds abomination. I don't know anyone who actually does .NET development in C++/CLI and I think it's an absolute travesty that Microsoft is trying it's "embrace, extend, extinguish" bullshit on a perfectly good, open systems programming language.
amphetamine
 
Posts: 23
Joined: Fri Dec 14, 2012 8:59 pm

Re: C++ Parsing Errors

Postby ctartamella on Fri Jan 18, 2013 9:59 pm

Your last point couldn't be more wrong. Anyone who works in the Windows world is often FORCED to use it. So while it may be atrocious (and it is) to say its not important is just plain incorrect. The whole point of it is that you DON'T do everything in it but rather to use it as a bridge, but avoiding that bridge is often impossible.
ctartamella
 
Posts: 4
Joined: Fri Nov 02, 2012 7:55 pm

Re: C++ Parsing Errors

Postby amphetamine on Tue Jan 22, 2013 12:12 pm

ctartamella wrote:Your last point couldn't be more wrong. Anyone who works in the Windows world is often FORCED to use it. So while it may be atrocious (and it is) to say its not important is just plain incorrect. The whole point of it is that you DON'T do everything in it but rather to use it as a bridge, but avoiding that bridge is often impossible.

I'm not really involved in professional Windows development and I generally write multi-platform code so C++ is my primary language (yeah, I know, what about Java, Mono and all that but I actually prefer programming in C++). That said, when I'm writing for Windows only, I'll often use C#.

I'm not gonna dispute your point because you clearly do need to use it but can I ask what you use it for? Presumably you're talking about bridging native code and .NET?

I could be wrong about its importance. All I can say is that I, personally, haven't ever needed it. I tried it just long enough to form an opinion not completely based on ignorance but fortunately I haven't used it again since then! Honestly, though, the fact that people are being forced to use it just makes its existence all the more annoying. It shouldn't need to exist.
amphetamine
 
Posts: 23
Joined: Fri Dec 14, 2012 8:59 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 26 guests