Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use def instead of lazy val #721

Merged
merged 1 commit into from Jul 27, 2017
Merged

Conversation

xuwei-k
Copy link
Member

@xuwei-k xuwei-k commented Jul 23, 2017

I think there is no benefit following pattern

class A(val x)

class B(y: A) {
  lazy val z = y.x
}

I think there is no benefit following pattern

```
class A(val x)

class B(y: A) {
  lazy val z = y.x
}
```
private[streams] lazy val statement: String = underlying.statement
private[streams] lazy val rawParameters: Seq[Any] = underlying.rawParameters
private[streams] lazy val parameters: Seq[Any] = underlying.parameters
private[streams] def statement: String = underlying.statement
Copy link
Member

Choose a reason for hiding this comment

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

Is there any specific reason to change only these three attributes (statement, rawParameters, and parameters)? What do you think changing extractor, fetchSize, tags, and queryTimeout as well?

Copy link
Member Author

Copy link
Member

Choose a reason for hiding this comment

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

hmm, I see. LGTM for these changes, so far.

@seratch
Copy link
Member

seratch commented Jul 25, 2017

LGTM. We need to fix the build issue with sbt 1.0, though.

@yoskhdia
Copy link
Member

LGTM

@seratch seratch merged commit 79b2b11 into scalikejdbc:master Jul 27, 2017
@xuwei-k xuwei-k deleted the avoid-lazy-val branch July 27, 2017 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants