News for hackers. Stuff that matters.
Re:The Monaco Code Editor by satysin on Monday June 20, 2016 @06:30PM (#11942119)
The highlighting isn't an issue, I think most editors cheat in the same way. As C++ is a super-set of C it shouldn't be a problem, at least not except for a few edge cases which I wouldn't worry about IMHO.

My comment was more that the C example code is actually C++.

Re:The Monaco Code Editor by mFixman on Monday June 20, 2016 @08:51PM (#11942775)
Except C isn't a subset of C++. There are many valid C keywords that aren't valid in C++, like restrict and _Noreturn.
Re:The Monaco Code Editor by satysin on Tuesday June 21, 2016 @02:53AM (#11943948)
Well MSVC only just supports C99 so asking for C11 keywords is unlikely to happen.

I had a quick look at their C++ word list [0] and it looks like _Imaginary and _Complex and _Bool are the only missing C99 keywords. Feel free to make a PR if you want them added :)

[0] https://github.com/Microsoft/monaco-languages/blob/master/sr...

Re:The Monaco Code Editor by lorenzhs on Tuesday June 21, 2016 @05:54AM (#11944634)
restrict is C99. Many C++ compilers accept __restrict__ or some other form of it to mean the same, but restrict doesn't exist in the C++ standard, so the GP is correct.
Re:The Monaco Code Editor by satysin on Tuesday June 21, 2016 @09:03AM (#11945297)
Good point, it gets tough remembering all the little differences between the two.
Re:The Monaco Code Editor by jongalloway2 on Tuesday June 21, 2016 @04:19AM (#11944281)