xxxxxxxxxx
// Rust does not have class
// Rust have `struct` and `impl`, they have the same class performance
struct Person {
name: String,
age: usize
}
impl Person {
// This associated function have the same `constrator` performance
fn new(name: String, age: usize) -> Self {
return Self {name, age};
}
fn get_name(&self) -> String {
return self.name;
}
fn change_name(&mut self, new_name: String) -> () {
self.name = new_name;
}
}
Start building with ChatGPT (OpenAI)
xxxxxxxxxx
git clone https://github.com/openai/openai-quickstart-node.git
npm install
npm run dev
Read more https://beta.openai.com/docs/quickstart/introduction
Funniest thing for you to google ChatGPT instead of asking ChatGPT to show you what ChatGPT is...
Anyway... it's chat.openai.com
All the best