{"action":"created","issue":{"url":"https://api.github.com/repos/cincheo/jsweet/issues/27","repository_url":"https://api.github.com/repos/cincheo/jsweet","labels_url":"https://api.github.com/repos/cincheo/jsweet/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/cincheo/jsweet/issues/27/comments","events_url":"https://api.github.com/repos/cincheo/jsweet/issues/27/events","html_url":"https://github.com/cincheo/jsweet/issues/27","id":125041964,"number":27,"title":"Support for Java APIs [originally: Add support for java.lang.Math]","user":{"login":"dasa","id":828058,"avatar_url":"https://avatars.githubusercontent.com/u/828058?v=3","gravatar_id":"","url":"https://api.github.com/users/dasa","html_url":"https://github.com/dasa","followers_url":"https://api.github.com/users/dasa/followers","following_url":"https://api.github.com/users/dasa/following{/other_user}","gists_url":"https://api.github.com/users/dasa/gists{/gist_id}","starred_url":"https://api.github.com/users/dasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasa/subscriptions","organizations_url":"https://api.github.com/users/dasa/orgs","repos_url":"https://api.github.com/users/dasa/repos","events_url":"https://api.github.com/users/dasa/events{/privacy}","received_events_url":"https://api.github.com/users/dasa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cincheo/jsweet/labels/discussion","name":"discussion","color":"aa55ff"},{"url":"https://api.github.com/repos/cincheo/jsweet/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-05T20:14:12Z","updated_at":"2016-02-06T06:48:03Z","closed_at":null,"body":"It'd be great to have as much support for java.lang.Math as possible."},"comment":{"url":"https://api.github.com/repos/cincheo/jsweet/issues/comments/180707873","html_url":"https://github.com/cincheo/jsweet/issues/27#issuecomment-180707873","issue_url":"https://api.github.com/repos/cincheo/jsweet/issues/27","id":180707873,"user":{"login":"renaudpawlak","id":6288061,"avatar_url":"https://avatars.githubusercontent.com/u/6288061?v=3","gravatar_id":"","url":"https://api.github.com/users/renaudpawlak","html_url":"https://github.com/renaudpawlak","followers_url":"https://api.github.com/users/renaudpawlak/followers","following_url":"https://api.github.com/users/renaudpawlak/following{/other_user}","gists_url":"https://api.github.com/users/renaudpawlak/gists{/gist_id}","starred_url":"https://api.github.com/users/renaudpawlak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renaudpawlak/subscriptions","organizations_url":"https://api.github.com/users/renaudpawlak/orgs","repos_url":"https://api.github.com/users/renaudpawlak/repos","events_url":"https://api.github.com/users/renaudpawlak/events{/privacy}","received_events_url":"https://api.github.com/users/renaudpawlak/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T06:48:03Z","updated_at":"2016-02-06T06:48:03Z","body":"Guys, if you are looking for a way to run existing Java programs in JavaScript, JSweet is not the right project. As I keep repeating, JSweet is *just* a Java syntax layer to TypeScript/JavaScript.\r\n\r\nAs you said it, metrospiegel, there are other projects of which it is the main goal (GWT, Dragome, TeaVM), but your EMF example shows well the difficulties/limitations of these approaches (BTW, have you tried DukeScript?). This is why I don't want JSweet to move toward this slippery slope...\r\n\r\nHowever, as I said, I hear your issue about helping migrating. I understand that it can be useful to *help* the programmers to migrate from Java to JavaScript. But IMO, supporting more Java API and constructs (such as \"instance of\" for interfaces) will not help. It will even make the situation worse, because it will make people believe that they don't need to migrate and that they can keep their old-fashioned Java code. I prefer having a well-scoped approach on that matter, so that people get disappointed UP-FRONT, rather than after months of work trying to use GWT or any equivalent approach (you can also read \"Reason 8\" in that [post](http://www.jsweet.org/10-reasons-to-use-jsweet/).\r\n\r\nIMO, reporting errors when a construct is not supported in JavaScript is already some help for migrating. If there are too many errors, we could allow plugins to refactor the code to help the migration so that the programmers don't need to do it all manually. But I don't really believe in a fully automatized solution.\r\n\r\nI am currently looking around to see what would be the best/simplest way to support such plugins. In any case, I believe that you would have to refactor your original code to make it work.\r\n"}}