Exotic architectures the standards committees care about
Take a look at this one
Unisys ClearPath Dorado Servers
offering backward compatibility for people who have not yet migrated all their Univac software.
Key points:
- 36-bit words
CHAR_BIT == 9
- one's complement
- 72-bit non-IEEE floating point
- separate address space for code and data
- word-addressed
- no dedicated stack pointer
Don't know if they offer a C++ compiler though, but they could.
And now a link to a recent edition of their C manual has surfaced:
Unisys C Compiler Programming Reference Manual
Section 4.5 has a table of data types with 9, 18, 36, and 72 bits.
Why it is not safe casting a pointer to a numeric type?
I can not understand what's wrong with reinterpret cast here?
Because int
s and pointers are not required by the standard to have the same size, thus you might lose information by casting.
What are the cases when this kind of casting will lead to an undefined behavior?
When this is true:
1 << (sizeof(T*) * CHAR_BIT) > INT_MAX
then the value of the address might not fill in an int
, which invokes Undefined Behavior.
Will
pa
always contain the correct decimal representation of a memory address ?
If you use std::[u]intptr_t, then yes, since these types are guaranteed to be able to hold the value of a pointer.
Can you hybridize microservices with monolithic applications?
Yes, you can extend an existing system by adding functionality in service format (and with its own development lifecycle). In this scenario you will likely view the legacy monolith as a "heavy" service that can interact with other services.
When you do that it is recommended that you ensure that the responsibilities are clearly separated and the communication/dependency between the services is versioned cleanly. That allows the version migration to follow best practices as you would with an external service provider. This in turn will make your overall architecture more flexible and scalable both in complexity and development organization size/productivity.
It is also a recommended practice to carve out specific components or functionality of a monolith in a step by step fashion when migrating to a microservices architecture style. So the situation you are describing is very common in this scenario.
I do recommend you read these basic articles from Martin Fowler (regarded as one of the inventors of the microservices architectural style).
Related Topics
Why Does an Overridden Function in the Derived Class Hide Other Overloads of the Base Class
What Exactly Is the "As-If" Rule
Undefined Reference to 'Winmain@16'
When to Use Volatile With Multi Threading
Calling Virtual Functions Inside Constructors
"Unpacking" a Tuple to Call a Matching Function Pointer
Erasing Elements from a Vector
How to Parse a String to an Int in C++
How to Read an Entire File into a Std::String in C++
Convert Char to Int in C and C++
C++ Delete - It Deletes My Objects But I Can Still Access the Data
Why Is Integer Assignment on a Naturally Aligned Variable Atomic on X86
Read Whole Ascii File into C++ Std::String
How to Initialize Private Static Members in C++
Function Pointer to Member Function
How to Properly Overload the ≪≪ Operator For an Ostream