Reputation
3,994
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
3 17 21
Newest
 Good Answer
Impact
~474k people reached

  • 0 posts edited
  • 0 helpful flags
  • 92 votes cast
23h
comment XML Stuctured C
"If not please mention a place where I should submit this idea." Submit it to what end? To get the rest of the world to translate their perfectly readable C code into your... version? Why? For what purpose? Besides making code substantially longer to read, what good does this accomplish? Not only that, your XML format itself is, to put it charitably, not good.
Jan
27
comment Why are reference-counting smart pointers so popular?
"they are mixed with other data." It's not so much that they're "mixed" with other data. It's easy to use the C++ type system to see what's a pointer and what is not. The problem is that pointers frequently become other data. Hiding a pointer in an integer is an unfortunately common tool for many C-style APIs.
Jan
27
comment Why are reference-counting smart pointers so popular?
Um, it's a question tagged c++ which talks about C++ features. Clearly, any general statements are talking about within C++ code, not the entirety of programming. So however "objectively" garbage collection may be in use outside of the C++ world, that is ultimately irrelevant to the question at hand.
Jan
24
awarded  Good Answer
Jan
23
reviewed Approve When is it appropriate to make a separate function when there will only ever be a single call to said function?
Jan
23
awarded  Nice Answer
Jan
23
revised When is it appropriate to make a separate function when there will only ever be a single call to said function?
added 5 characters in body
Jan
23
comment When is it appropriate to make a separate function when there will only ever be a single call to said function?
@user61852: I think the problem he's getting at is that you don't explain why you should do that. You give guidance, but no reasoning.
Jan
23
answered When is it appropriate to make a separate function when there will only ever be a single call to said function?
Jan
10
comment What are the advantages of GLSL's compilation model?
"The trick here is that the array cannot be accessed using directly an uniform variable." That is a driver bug, not a "misunderstanding of the GLSL specification". No version of GLSL has ever declared that array indexing via a uniform is illegal, that you have to use an explicit temporary stack variable between them.
Jan
10
revised Is `catch(…) { throw; }` a bad practice?
added 209 characters in body
Jan
7
comment OpenGL, multithreading, and throwing destructors
@greyfade: Nonsense. If you're talking about multiple contexts that aren't shared, then its still up to the writer of the application to know which objects belong to which context. No safety is ever perfect; the question is merely what is "reasonable". It all depends on how you structure your code. You can build your application such that the objects that are owned by one context are hidden from the objects owned by another. Such that it's functionally impossible for them to be deleted while the wrong context is current.
Jan
7
comment OpenGL, multithreading, and throwing destructors
" Will it leave the process in a known state? Chances are low." I think chances are lower than that. You'd be in a destructor. I cannot honestly think of a place more likely to leave things in an unknown state when killing a thread. After all, other places don't offer the possibility of killing a thread while the stack is being unwound due to an exception.
Jan
6
answered OpenGL, multithreading, and throwing destructors
Jan
6
comment OpenGL, multithreading, and throwing destructors
"The root of the issue is a concurrency issue." No, it isn't. Concurrency is usually not in play here. The current context is a thread-local construct, so it's not really possible to race on it. Either the context is current in the thread where the object is being destroyed or it isn't. The most you could race on would be some other thread destroying it.
Jan
6
comment OpenGL, multithreading, and throwing destructors
"not that I can understand why you'd want to perform multi-threading with an OpenGL context, as the calls needed to do so are expensive enough to negate any benefit you might get out of it from what I understand" There are many reasons for doing so. Constructing objects in the background. Loading textures in the background. Etc. This is usually done by making multiple, shared contexts. That way, each thread has its own graphics context.
Dec
18
awarded  Nice Answer
Oct
5
awarded  Good Answer
Jun
20
awarded  Yearling
Feb
18
awarded  Pundit