GitHub PullRequestReviewCommentEvent at 2014-01-15 07:29:43
Repository: scala
Actor: Ichoran
Payload: {"comment":{"url":"https://api.github.com/repos/scala/scala/pulls/comments/8888227","id":8888227,"diff_hunk":"@@ -145,16 +145,13 @@ import java.util.regex.{ Pattern, Matcher }\n  *  to automatically escape these characters.\n  */\n @SerialVersionUID(-2094783597747625537L)\n-class Regex private[matching](val pattern: Pattern, groupNames: String*) extends Serializable {\n+class Regex(val regex: String, groupNames: String*) extends Serializable {","path":"src/library/scala/util/matching/Regex.scala","position":14,"original_position":14,"commit_id":"8fe411f1cac319a05cf79b23d4393227fa13ef67","original_commit_id":"8fe411f1cac319a05cf79b23d4393227fa13ef67","user":{"login":"Ichoran","id":2298644,"avatar_url":"https://gravatar.com/avatar/3698349ad0b898d398a6573f4d1f867a?d=https%3A%2F%2Fidenticons.github.com%2Ffc12483537f3df99d480423de674e099.png&r=x","gravatar_id":"3698349ad0b898d398a6573f4d1f867a","url":"https://api.github.com/users/Ichoran","html_url":"https://github.com/Ichoran","followers_url":"https://api.github.com/users/Ichoran/followers","following_url":"https://api.github.com/users/Ichoran/following{/other_user}","gists_url":"https://api.github.com/users/Ichoran/gists{/gist_id}","starred_url":"https://api.github.com/users/Ichoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ichoran/subscriptions","organizations_url":"https://api.github.com/users/Ichoran/orgs","repos_url":"https://api.github.com/users/Ichoran/repos","events_url":"https://api.github.com/users/Ichoran/events{/privacy}","received_events_url":"https://api.github.com/users/Ichoran/received_events","type":"User","site_admin":false},"body":"Well, there's always the lovely `Regex private[matching](pattern0: Pattern, regex0: String, groupNames: String*)` followed by\r\n`this(regex: String, groupNames: String*) = this(null, regex, groupNames)` and then `lazy val pattern: Pattern = if (pattern0 == null) pattern0 else Pattern compile regex0` and the opposite logic for `lazy val regex`.\r\n\r\nI'm not sure the precompiled pattern case is important enough to generate such ugliness.","created_at":"2014-01-15T07:29:43Z","updated_at":"2014-01-15T07:29:43Z","html_url":"https://github.com/scala/scala/pull/3343#discussion_r8888227","pull_request_url":"https://api.github.com/repos/scala/scala/pulls/3343","_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/comments/8888227"},"html":{"href":"https://github.com/scala/scala/pull/3343#discussion_r8888227"},"pull_request":{"href":"https://api.github.com/repos/scala/scala/pulls/3343"}}}}