{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/19678","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/19678/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/19678/comments","events_url":"https://api.github.com/repos/akka/akka/issues/19678/events","html_url":"https://github.com/akka/akka/issues/19678","id":130842631,"number":19678,"title":"Variadic route concatenation function","user":{"login":"acjay","id":1256382,"avatar_url":"https://avatars.githubusercontent.com/u/1256382?v=3","gravatar_id":"","url":"https://api.github.com/users/acjay","html_url":"https://github.com/acjay","followers_url":"https://api.github.com/users/acjay/followers","following_url":"https://api.github.com/users/acjay/following{/other_user}","gists_url":"https://api.github.com/users/acjay/gists{/gist_id}","starred_url":"https://api.github.com/users/acjay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acjay/subscriptions","organizations_url":"https://api.github.com/users/acjay/orgs","repos_url":"https://api.github.com/users/acjay/repos","events_url":"https://api.github.com/users/acjay/events{/privacy}","received_events_url":"https://api.github.com/users/acjay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/akka/akka/labels/obsolete%20%E2%80%93%20reopen%20if%20necessary","name":"obsolete – reopen if necessary","color":"cc00cc"},{"url":"https://api.github.com/repos/akka/akka/labels/t:http","name":"t:http","color":"CCCCCC"},{"url":"https://api.github.com/repos/akka/akka/labels/t:http:server:dsl","name":"t:http:server:dsl","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/akka/akka/milestones/82","html_url":"https://github.com/akka/akka/milestones/2.4.4","labels_url":"https://api.github.com/repos/akka/akka/milestones/82/labels","id":1677650,"number":82,"title":"2.4.4","description":null,"creator":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":2,"state":"open","created_at":"2016-04-01T08:39:45Z","updated_at":"2016-04-04T13:22:56Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2016-02-02T22:38:47Z","updated_at":"2016-04-04T14:21:11Z","closed_at":null,"body":"As [noted in the docs](http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0.1/scala/http/routing-dsl/directives/index.html#Composing_Directives), using the `~` combinator for route concatenation is error prone. Any time someone uses curly braces to group routes in the inner route part of a directive, it's a very easy mistake to make to omit the `~`. Less importantly, most formatters attempt to indent all but the first directive, which in most cases would be the desired formatting, but feels weird for routes. This makes me suspect that an infix operator for route concatenation may not be the most natural thing, and perhaps not the ideal thing to recommend in the docs.\r\n\r\nWould the project be amenable to a PR that adds a variadic route concatenation function to the [RouteConcatenation](https://github.com/akka/akka/blob/f008a932c381013f6060ee00a731862bafed2be7/akka-http/src/main/scala/akka/http/scaladsl/server/RouteConcatenation.scala#L10) trait? I'm not an expert on whether there's any downside to this, but in my project, I'm using the following:\r\n\r\n```\r\ndef all(routes: Route*): Route = routes.foldLeft[Route](reject())(_ ~ _)\r\n```\r\n\r\n(I think that empty `reject()` is the correct semantics?) I'm open to suggestions on any improvements and the name."},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/205317904","html_url":"https://github.com/akka/akka/issues/19678#issuecomment-205317904","issue_url":"https://api.github.com/repos/akka/akka/issues/19678","id":205317904,"user":{"login":"viktorklang","id":10871,"avatar_url":"https://avatars.githubusercontent.com/u/10871?v=3","gravatar_id":"","url":"https://api.github.com/users/viktorklang","html_url":"https://github.com/viktorklang","followers_url":"https://api.github.com/users/viktorklang/followers","following_url":"https://api.github.com/users/viktorklang/following{/other_user}","gists_url":"https://api.github.com/users/viktorklang/gists{/gist_id}","starred_url":"https://api.github.com/users/viktorklang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktorklang/subscriptions","organizations_url":"https://api.github.com/users/viktorklang/orgs","repos_url":"https://api.github.com/users/viktorklang/repos","events_url":"https://api.github.com/users/viktorklang/events{/privacy}","received_events_url":"https://api.github.com/users/viktorklang/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T14:21:11Z","updated_at":"2016-04-04T14:21:11Z","body":"What about `routes`?"}}