Honestly, I believe C++ should jumpstart to the next level
instead of trying to copy other languages' features and should
also retroactively fix its core memory management issues one way
or the other. An axiom could be used to add implicit member
variables as well to existing structures, which is a step forward
for "intrusive reference counting" or a reference to an implicit
"proxy" like C++ Superset does.
Again, otherwise I'll tend to agree with Linus Torvalds when he said that "C++ fixes the wrong problems".
I just saw that the C++23 "Reflection" will be capable of scanning all object members so maybe that can be an alternative or maybe not:
On 1/4/22 3:29 PM, Phil Bouchard via Std-Proposals wrote:
Yeah an axiom should be more like:
template <typename T>
axiom xml
{
template <typename U>
ostream & operator << (U const & i); // Writes data to the server
ostream & operator << (std::string const & i); // Writes specialized data to the server
template <typename U>
ostream & operator >> (U & i); // Reads data from the server
...
};
On 1/4/22 3:20 PM, Phil Bouchard via Std-Proposals wrote:
Sorry the << and >> should be flipped.
On 1/4/22 3:19 PM, Phil Bouchard via Std-Proposals wrote:
Greetings,
I just had this idea today and it makes a lot of sense to add to the ISO C++ Standards.
1) Classes and structures are used for what exactly?
- Databases;
- XML I/O;
- Binary XML I/O;
- UI Widgets;
- Neural Network Abstraction & Representation;
- ...
2) What I am suggesting is to add a series of axioms that will implicitly transform simple namespaced structures into fully functional code, i.e.:
namespace data
{
struct Address
{
std::string country, state, city, street, zip_code;
unsigned int number;
};
struct Employee
{
std::string first_name, surname;
unsigned int age;
double salary;
std::string position;
Address address;
};
}
3) You create the axioms:
template <typename T>
axiom xml
{
[...] somehow reads all member variables and converts them into Database Data, XML, Binary XML, UI Widgets, ...
};
4) You start using it:
xml<Data::Employee> employee1(/* Creates Connection to XML Server */);
employee1 >> ...; // Writes to XML Server
Or:
ui<Data::Employee> employee2; // Creates widget
employee2 << ...; // Reads from widget
So basically we need to create an mutliusage abstraction layer so that structures are really defined only once. I still haven't decided the best way to represent these axioms but I'll come up with something soon. But basically the "axiom" will have the capability to scan implicitly all member variables of a given class.
Regards,
--
Email Signature
![]()
Phil Bouchard ![]()
CTO T: (819) 328-4743 E: phil@fornux.com | www.fornux.com 1188 rue Saint-Louis | Gatineau (Qc), J8T 2L8 Canada Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés uniquement aux personnes identifiées et peuvent contenir des informations privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies.
--
Email Signature
![]()
Phil Bouchard ![]()
CTO T: (819) 328-4743 E: phil@fornux.com | www.fornux.com 1188 rue Saint-Louis | Gatineau (Qc), J8T 2L8 Canada Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés uniquement aux personnes identifiées et peuvent contenir des informations privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies.
--
Email Signature
![]()
Phil Bouchard ![]()
CTO T: (819) 328-4743 E: phil@fornux.com | www.fornux.com 1188 rue Saint-Louis | Gatineau (Qc), J8T 2L8 Canada Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés uniquement aux personnes identifiées et peuvent contenir des informations privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies.
--
Email Signature
![]()
Phil Bouchard ![]()
CTO T: (819) 328-4743 E: phil@fornux.com | www.fornux.com 1188 rue Saint-Louis | Gatineau (Qc), J8T 2L8 Canada Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés uniquement aux personnes identifiées et peuvent contenir des informations privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies.
|
|
|||||||
Le message ci-dessus,
ainsi que les documents l'accompagnant, sont destinés
uniquement aux personnes identifiées et peuvent contenir
des informations privilégiées, confidentielles ou ne
pouvant être divulguées. Si vous avez reçu ce message par
erreur, veuillez le détruire.This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies. |
||||||||