Skip to content

Add create function prefix#29

Open
profuel wants to merge 1 commit into
kettanaito:mainfrom
profuel:patch-1
Open

Add create function prefix#29
profuel wants to merge 1 commit into
kettanaito:mainfrom
profuel:patch-1

Conversation

@profuel

@profuel profuel commented Jan 19, 2021

Copy link
Copy Markdown

We use this quite often, so I think it makes sense to include in the convention

Comment thread README.md

```js
function createPage(pageName) {
return new Page(pageName)

@silesky silesky Jan 25, 2021

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create makes sense.

However, the “new” keyword already implies “create”, making the example potentially confusing, since it’s adds no meaningful context and thus seems like an overly ‘contrived’ abstraction.

Would it make sense for this example to imitate delete (where it assumes a database model)?

@dereuromark dereuromark mentioned this pull request Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants