actions on objects: user.get(), user.add(), post.modify(), post.delete()
user = new User(id) print database.get(user) posts = new Posts() print database.get(posts) post = new Post(data) database.update(post)
Yeah, that works too! I prefer a more functional approach though, that's pretty much what I described :) this is more OOP.
But as long as you and any person who hasn't seen your code can read it, anything works!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
actions on objects: user.get(), user.add(), post.modify(), post.delete()
Yeah, that works too! I prefer a more functional approach though, that's pretty much what I described :) this is more OOP.
But as long as you and any person who hasn't seen your code can read it, anything works!