{"action":"created","comment":{"url":"https://api.github.com/repos/scala/scala.github.com/pulls/comments/48047599","id":48047599,"diff_hunk":"@@ -0,0 +1,716 @@\n+---\n+layout: overview\n+title: Un'introduzione a Scala per programmatori Java\n+overview: scala-for-java-programmers\n+\n+disqus: true\n+multilingual-overview: true\n+language: [it]\n+---\n+\n+Di Michel Schinz e Philipp Haller.\n+Traduzione italiana a cura di Mirco Veltri.\n+\n+## Introduzione\n+\n+Lo scopo di questo documento è quello di fornire una rapida\n+introduzione al linguaggio e al compilatore Scala. È rivolto a\n+chi ha già qualche esperienza  di programmazione e desidera una\n+panoramica di cosa è possibile fare con Scala. Si assume una\n+conoscenza di base dei concetti di programmazione orientata\n+agli oggetti, specialmente in Java.\n+\n+## Un Primo Esempio\n+\n+Come primo esempio useremo lo standard *Hello world*.  Non è sicuramente\n+un esempio entusiasmante ma rende facile dimostrare l'uso dei tool di\n+Scala senza richiedere troppe conoscenze del linguaggio stesso.\n+Ecco come appeare il codice:\n+\n+    object HelloWorld {\n+      def main(args: Array[String]) {\n+        println(\"Hello, world!\")\n+      }\n+    }\n+\n+La struttura di questo programma dovrebbe essere familiare ai\n+programmatori Java: c'è un metodo chiamato `main` che accetta argomenti,\n+un array di stringhe, forniti da riga di comando come\n+parametri; Il corpo del metodo consiste di una singola chiamata al\n+predefinito `println` che riceve il nostro amichevole saluto\n+come parametro. Il metodo `main` non ritorna alcun valore\n+(è un metodo procedura), pertanto non è necessario dichiararne uno\n+di ritorno.\n+\n+Ciò che è meno familiare ai programmatori Java è la\n+dichiarazione di `object` contenente il metodo `main`.\n+Tale dichiarazione introduce ciò che è comunemente chiamato\n+*oggetto singleton*, cioè una classe con una unica istanza.\n+La dichiarazione precedente infatti crea sia la classe `HelloWorld`\n+che una istanza di essa, chiamata `HelloWorld`. L'istanza è creata\n+su richiesta la prima volta che è usata.\n+\n+\n+Il lettore astuto avrà notato che il metodo `main` non è stato\n+dichiarato come `static`. Questo perchè  i membri (metodi o campi)\n+statici non esistono in Scala. Invece che definire membri statici,\n+il programmatore Scala li dichiara in oggetti singleton.\n+\n+### Compiliamo l'esempio\n+\n+Per compilare l'esempio useremo `scalac`, il compilatore Scala.\n+`scalac` lavora come la maggior parte dei compilatori: prende un file\n+sorgente come argomento, eventuali opzioni e produce  uno o più object\n+file come output. Gli object file sono gli standard file delle classi","path":"it/tutorials/scala-for-java-programmers.md","position":64,"original_position":64,"commit_id":"7bc3732239c316724ceab03569a16395b8783d02","original_commit_id":"7bc3732239c316724ceab03569a16395b8783d02","user":{"login":"dotta","id":703748,"avatar_url":"https://avatars.githubusercontent.com/u/703748?v=3","gravatar_id":"","url":"https://api.github.com/users/dotta","html_url":"https://github.com/dotta","followers_url":"https://api.github.com/users/dotta/followers","following_url":"https://api.github.com/users/dotta/following{/other_user}","gists_url":"https://api.github.com/users/dotta/gists{/gist_id}","starred_url":"https://api.github.com/users/dotta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotta/subscriptions","organizations_url":"https://api.github.com/users/dotta/orgs","repos_url":"https://api.github.com/users/dotta/repos","events_url":"https://api.github.com/users/dotta/events{/privacy}","received_events_url":"https://api.github.com/users/dotta/received_events","type":"User","site_admin":false},"body":"s/object file/class file\r\n\r\nAlso considering that in the next paragraph `class file` is used already.","created_at":"2015-12-18T17:17:58Z","updated_at":"2015-12-18T17:17:58Z","html_url":"https://github.com/scala/scala.github.com/pull/453#discussion_r48047599","pull_request_url":"https://api.github.com/repos/scala/scala.github.com/pulls/453","_links":{"self":{"href":"https://api.github.com/repos/scala/scala.github.com/pulls/comments/48047599"},"html":{"href":"https://github.com/scala/scala.github.com/pull/453#discussion_r48047599"},"pull_request":{"href":"https://api.github.com/repos/scala/scala.github.com/pulls/453"}}},"pull_request":{"url":"https://api.github.com/repos/scala/scala.github.com/pulls/453","id":44309711,"html_url":"https://github.com/scala/scala.github.com/pull/453","diff_url":"https://github.com/scala/scala.github.com/pull/453.diff","patch_url":"https://github.com/scala/scala.github.com/pull/453.patch","issue_url":"https://api.github.com/repos/scala/scala.github.com/issues/453","number":453,"state":"open","locked":false,"title":"Italian translation added","user":{"login":"indaco","id":13519,"avatar_url":"https://avatars.githubusercontent.com/u/13519?v=3","gravatar_id":"","url":"https://api.github.com/users/indaco","html_url":"https://github.com/indaco","followers_url":"https://api.github.com/users/indaco/followers","following_url":"https://api.github.com/users/indaco/following{/other_user}","gists_url":"https://api.github.com/users/indaco/gists{/gist_id}","starred_url":"https://api.github.com/users/indaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indaco/subscriptions","organizations_url":"https://api.github.com/users/indaco/orgs","repos_url":"https://api.github.com/users/indaco/repos","events_url":"https://api.github.com/users/indaco/events{/privacy}","received_events_url":"https://api.github.com/users/indaco/received_events","type":"User","site_admin":false},"body":"Added Italian translation for the tutorial. It is a good opportunity to review what I previously did in 2009 -  http://bit.ly/1EJepIK","created_at":"2015-09-06T20:53:35Z","updated_at":"2015-12-18T17:17:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"019443054650d4407f7718e415deea70ff112cb0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scala/scala.github.com/pulls/453/commits","review_comments_url":"https://api.github.com/repos/scala/scala.github.com/pulls/453/comments","review_comment_url":"https://api.github.com/repos/scala/scala.github.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scala/scala.github.com/issues/453/comments","statuses_url":"https://api.github.com/repos/scala/scala.github.com/statuses/7bc3732239c316724ceab03569a16395b8783d02","head":{"label":"indaco:master","ref":"master","sha":"7bc3732239c316724ceab03569a16395b8783d02","user":{"login":"indaco","id":13519,"avatar_url":"https://avatars.githubusercontent.com/u/13519?v=3","gravatar_id":"","url":"https://api.github.com/users/indaco","html_url":"https://github.com/indaco","followers_url":"https://api.github.com/users/indaco/followers","following_url":"https://api.github.com/users/indaco/following{/other_user}","gists_url":"https://api.github.com/users/indaco/gists{/gist_id}","starred_url":"https://api.github.com/users/indaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indaco/subscriptions","organizations_url":"https://api.github.com/users/indaco/orgs","repos_url":"https://api.github.com/users/indaco/repos","events_url":"https://api.github.com/users/indaco/events{/privacy}","received_events_url":"https://api.github.com/users/indaco/received_events","type":"User","site_admin":false},"repo":{"id":42016609,"name":"scala.github.com","full_name":"indaco/scala.github.com","owner":{"login":"indaco","id":13519,"avatar_url":"https://avatars.githubusercontent.com/u/13519?v=3","gravatar_id":"","url":"https://api.github.com/users/indaco","html_url":"https://github.com/indaco","followers_url":"https://api.github.com/users/indaco/followers","following_url":"https://api.github.com/users/indaco/following{/other_user}","gists_url":"https://api.github.com/users/indaco/gists{/gist_id}","starred_url":"https://api.github.com/users/indaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indaco/subscriptions","organizations_url":"https://api.github.com/users/indaco/orgs","repos_url":"https://api.github.com/users/indaco/repos","events_url":"https://api.github.com/users/indaco/events{/privacy}","received_events_url":"https://api.github.com/users/indaco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/indaco/scala.github.com","description":"The Scala Documentation website","fork":true,"url":"https://api.github.com/repos/indaco/scala.github.com","forks_url":"https://api.github.com/repos/indaco/scala.github.com/forks","keys_url":"https://api.github.com/repos/indaco/scala.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indaco/scala.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indaco/scala.github.com/teams","hooks_url":"https://api.github.com/repos/indaco/scala.github.com/hooks","issue_events_url":"https://api.github.com/repos/indaco/scala.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/indaco/scala.github.com/events","assignees_url":"https://api.github.com/repos/indaco/scala.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/indaco/scala.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/indaco/scala.github.com/tags","blobs_url":"https://api.github.com/repos/indaco/scala.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indaco/scala.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indaco/scala.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/indaco/scala.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indaco/scala.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/indaco/scala.github.com/languages","stargazers_url":"https://api.github.com/repos/indaco/scala.github.com/stargazers","contributors_url":"https://api.github.com/repos/indaco/scala.github.com/contributors","subscribers_url":"https://api.github.com/repos/indaco/scala.github.com/subscribers","subscription_url":"https://api.github.com/repos/indaco/scala.github.com/subscription","commits_url":"https://api.github.com/repos/indaco/scala.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/indaco/scala.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/indaco/scala.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/indaco/scala.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/indaco/scala.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/indaco/scala.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indaco/scala.github.com/merges","archive_url":"https://api.github.com/repos/indaco/scala.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indaco/scala.github.com/downloads","issues_url":"https://api.github.com/repos/indaco/scala.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/indaco/scala.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/indaco/scala.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/indaco/scala.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indaco/scala.github.com/labels{/name}","releases_url":"https://api.github.com/repos/indaco/scala.github.com/releases{/id}","created_at":"2015-09-06T19:45:33Z","updated_at":"2015-09-06T19:45:34Z","pushed_at":"2015-09-11T20:29:59Z","git_url":"git://github.com/indaco/scala.github.com.git","ssh_url":"git@github.com:indaco/scala.github.com.git","clone_url":"https://github.com/indaco/scala.github.com.git","svn_url":"https://github.com/indaco/scala.github.com","homepage":"http://docs.scala-lang.org","size":4302,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scala:master","ref":"master","sha":"fcb6c7bf8b39fc4695e7b088177fd076d6674ced","user":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"repo":{"id":2577071,"name":"scala.github.com","full_name":"scala/scala.github.com","owner":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scala/scala.github.com","description":"The Scala Documentation website","fork":false,"url":"https://api.github.com/repos/scala/scala.github.com","forks_url":"https://api.github.com/repos/scala/scala.github.com/forks","keys_url":"https://api.github.com/repos/scala/scala.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala/scala.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala/scala.github.com/teams","hooks_url":"https://api.github.com/repos/scala/scala.github.com/hooks","issue_events_url":"https://api.github.com/repos/scala/scala.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/scala/scala.github.com/events","assignees_url":"https://api.github.com/repos/scala/scala.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/scala/scala.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/scala/scala.github.com/tags","blobs_url":"https://api.github.com/repos/scala/scala.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala/scala.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala/scala.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala/scala.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala/scala.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/scala/scala.github.com/languages","stargazers_url":"https://api.github.com/repos/scala/scala.github.com/stargazers","contributors_url":"https://api.github.com/repos/scala/scala.github.com/contributors","subscribers_url":"https://api.github.com/repos/scala/scala.github.com/subscribers","subscription_url":"https://api.github.com/repos/scala/scala.github.com/subscription","commits_url":"https://api.github.com/repos/scala/scala.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala/scala.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala/scala.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala/scala.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/scala/scala.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/scala/scala.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala/scala.github.com/merges","archive_url":"https://api.github.com/repos/scala/scala.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala/scala.github.com/downloads","issues_url":"https://api.github.com/repos/scala/scala.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/scala/scala.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/scala/scala.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/scala/scala.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala/scala.github.com/labels{/name}","releases_url":"https://api.github.com/repos/scala/scala.github.com/releases{/id}","created_at":"2011-10-14T15:37:14Z","updated_at":"2015-12-16T19:04:45Z","pushed_at":"2015-12-18T13:23:08Z","git_url":"git://github.com/scala/scala.github.com.git","ssh_url":"git@github.com:scala/scala.github.com.git","clone_url":"https://github.com/scala/scala.github.com.git","svn_url":"https://github.com/scala/scala.github.com","homepage":"http://docs.scala-lang.org","size":5404,"stargazers_count":207,"watchers_count":207,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":214,"mirror_url":null,"open_issues_count":27,"forks":214,"open_issues":27,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scala/scala.github.com/pulls/453"},"html":{"href":"https://github.com/scala/scala.github.com/pull/453"},"issue":{"href":"https://api.github.com/repos/scala/scala.github.com/issues/453"},"comments":{"href":"https://api.github.com/repos/scala/scala.github.com/issues/453/comments"},"review_comments":{"href":"https://api.github.com/repos/scala/scala.github.com/pulls/453/comments"},"review_comment":{"href":"https://api.github.com/repos/scala/scala.github.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scala/scala.github.com/pulls/453/commits"},"statuses":{"href":"https://api.github.com/repos/scala/scala.github.com/statuses/7bc3732239c316724ceab03569a16395b8783d02"}}}}