Author: Chris Lattner
This is a robust implementation that is extensible for anything that requires the use of OTP. Want to use OTP to verify | |
a user? Check! Want to use OTP to validate an order? CHeck! Want to use OTP to reset a password? CHEck! Want to use | |
OTP to verify a device? CHECk! Want to use OTP to fight people? CHECK! | |
I used: Django (framework), Django Rest Framework (a plugin for REST API), PostgreSQL (database) | |
and email (for sending the otp). You can substitute any of these for whatever you want, like using Redis instead of Postgres. | |
While this solution is built to be used for Django, I have added comments to explain the process for developers using | |
other frameworks. | |
Legend: |
Update March 2025: I am working on a newer version of this proposal, that aims to simplify the model substantially. It's still based on "regions", but I am no longer tying a region to a specific path in the ownership tree. When I have finished that proposal, I will put a link here.
In this document, I present a novel model for memory-safe references that aims to significantly improve upon the Rust-inspired model that Mojo currently uses.
The major advancement is to eliminate the "aliasing XOR mutability" restriction amongst references, and replace it with a similar restriction applied to lifetime parameters. This model is significantly more expressive, allowing many of the memory-safe programs that Rust rejects to compile successfully, without resorting to escape hatches.
This document is meant to be a high-level overview, not a specification. Some details are omitted for the sake of brevity, others are omitted because the design is not fully finished. The design has been under development