View Proposal


Proposer
Adam Sampson
Title
Customisable pointer decorator syntax for C++
Goal
Add more convenient syntax for std::shared_ptr, etc.
Description
Programming in modern C++ is made considerably safer by the existence of smart pointer classes such as std::shared_ptr; in most cases, these can be used as drop-in replacements for C-style pointers, avoiding many of the security and correctness faults common with pointer use. However, these are library features - there's no affordance in the language to make using them more convenient. Add support to a C++ compiler for a more convenient syntax for smart pointers, like the existing syntaxes for C-style pointers (*) and C++ references (&). For example, you might allow a shared_ptr argument to be written as "Foo% ptr". You'd need to design an appropriate syntax, modify a compiler to understand it, and evaluate whether it measurably simplifies real-world code. The "cpp2" syntax (https://hsutter.github.io/cppfront/) would be worth looking at for ideas, but the idea here is to maintain compatibility with existing C++ programs rather than designing a new, incompatible syntax.
Resources
Background
Url
Difficulty Level
High
Ethical Approval
None
Number Of Students
1
Supervisor
Adam Sampson
Keywords
c++, syntax, compiler
Degrees
Bachelor of Science in Computer Science
Bachelor of Science in Computer Systems
Master of Engineering in Software Engineering
Master of Design in Games Design and Development
Master of Science in Computer Science for Cyber Security
Master of Science in Computing (2 Years)
Master of Science in Information Technology (Software Systems)
Master of Science in Network Security
Master of Science in Software Engineering
Bachelor of Science in Computing Science
Bachelor of Engineering in Robotics
Bachelor of Science in Computer Science (Cyber Security)