Reputation
205
Top tag
Next privilege 250 Rep.
View close votes
Badges
1 10
Newest
 Critic
Impact
~3k people reached

  • 0 posts edited
  • 1 helpful flag
  • 16 votes cast
Jun
15
comment C++ : Lack of Standardization at the Binary Level
@Steve But C has a well defined ABI on i386 and AMD64, so I can pass a pointer to a function compiled by GCC version X to a function compiled by MSVC version Y. Doing that with a C++ function is impossible.
Jun
14
comment Did C++11 address concerns passing std lib objects between dynamic/shared library boundaries? (ie dlls and so)?
@JanHudec With your interpretation of ODR, shared object has to violate the ODR. A plug-in needs a set of entry points with a name defined by the plug-in API. Now if ODR is per process as you suggest, only one plug-in of the same kind can be loaded simultaneously. But from the manpage dlsym behaves like GetProcAddress, expect that the latter gives up if the symbol is not found in the specified library.
Jun
13
comment Which document model to choose in different situations
So where can I find pros and cons?
Jun
12
comment Which document model to choose in different situations
@Zibboz Yes, stick to one. Give some examples of how requirements maps to different solutions.
Mar
16
comment Data padding for different hardware support?
Which means that it is not safe to read byte-by-byte either, since reading a single byte can result in bus error. But that is a lesser problem that memory access since I/O should be done in larger blocks anyway.
Mar
16
comment Data padding for different hardware support?
I thought it only affected pointer dereference, not file I/O.
Dec
24
comment Why do C++ and Java both use the notion of “reference” but not in the same sense?
Isn't "Handle" the correct term for Java references? A handle can be reassigned but not share no other pointer properties.
Feb
23
comment Return compound structure from getter method in DTO
@Aaronaught Good point. You may write that as an answer with a little more examples. It is possible for the consumer to pick up the raw pointer from an returned Array reference anyway.
Feb
23
comment Return compound structure from getter method in DTO
@gnat This is DTO. In this case, there is no way around so I asked what sucks least.
Feb
9
comment Outline for technical software documentation
@DocBrown: I thought mention "API Reference" implied the audience
Feb
9
comment Outline for technical software documentation
@DocBrown: "end users" are other developers.
Jan
10
comment Using partially implemented interfaces
@neontapir Exactly: There might be other implementations of A that do not share the implementation of doStuff.
Jan
10
comment Using partially implemented interfaces
@JeroenVannel But does it make sense to say that B objects is substitutable for D objects? The latter avoids the more or less artificial construct D (no such thing exists in the underlaying model).
Jan
7
comment Use null object as argument to method
Also this gives a gain in performance, since, in some cases i would know that I do not have a null pointer, and then the check is unnecessary. Using a helper method, gives the programmer the choice of guarded/unguarded behaviour.
Jan
7
comment Use null object as argument to method
@Phoshi In my situation, a missing key does not necessary imply a failure. Therefore, findObject should not throw.
Jan
7
comment Use null object as argument to method
@ratchetfreak It works in g++ (Ubuntu/Linaro 4.7.2-2ubuntu1~ubuntu12.04.1~ppa1) 4.7.2 with -O3 so gcc does not skip the if statement. It would be undefined behavior to try to access values and n_values, which it does not.
Jul
13
comment Should UTF-16 be considered harmful?
@rmeador I would like to kill a widespread myth: UTF-8 is actually NOT compatible with any 8-bit based encoding. This is a fact that everyone in Europe should know. UTF-8 is backward compatible with US-ASCII, nothing more.
Apr
20
comment Nested classes vs namespaces
@EmilioGaravaglia This template requires the inner classes (or typedefs does not matter) In and Out in class TypeOfData.
Dec
13
comment Interface extension
@gnat letting the method return false if seeking is not supported can work very well. I can just probe for seek support using foo.seek(0,SEEK_CURRENT) ie seek 0 bytes from current position.
Dec
13
comment Interface extension
It seems somewhat overkill