{"action":"created","issue":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/404","repository_url":"https://api.github.com/repos/volkanceylan/Serenity","labels_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/404/labels{/name}","comments_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/404/comments","events_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/404/events","html_url":"https://github.com/volkanceylan/Serenity/issues/404","id":140613443,"number":404,"title":"[Please Comment] Inquiry about switching to TypeScript","user":{"login":"volkanceylan","id":752470,"avatar_url":"https://avatars.githubusercontent.com/u/752470?v=3","gravatar_id":"","url":"https://api.github.com/users/volkanceylan","html_url":"https://github.com/volkanceylan","followers_url":"https://api.github.com/users/volkanceylan/followers","following_url":"https://api.github.com/users/volkanceylan/following{/other_user}","gists_url":"https://api.github.com/users/volkanceylan/gists{/gist_id}","starred_url":"https://api.github.com/users/volkanceylan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volkanceylan/subscriptions","organizations_url":"https://api.github.com/users/volkanceylan/orgs","repos_url":"https://api.github.com/users/volkanceylan/repos","events_url":"https://api.github.com/users/volkanceylan/events{/privacy}","received_events_url":"https://api.github.com/users/volkanceylan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-03-14T08:58:55Z","updated_at":"2016-03-15T09:26:12Z","closed_at":null,"body":"For some time, I'm considering about switching to TypeScript from Saltarelle for client side code.\r\n\r\nI would like to hear what you think about this change. First, rationale behind this:\r\n\r\n## Current Situation with Saltarelle\r\n\r\n* Saltarelle is acquired by Bridge.Net last year. At first, it seemed like a good opportunity but there are no updates to Saltarelle repository since June. \r\n* They are merging two compilers, and even though they said priority is to Saltarelle code, i'm expecting many breaking changes. My request to view development repository to see how it is gonna affect Serenity apps is rejected simply with \"don't need more prying eyes\". They have a strange open (closed?) source development model.\r\n* I don't expect them to release Bridge.Net 2.0, one that will be merged with Saltarelle, till Q4 2016.\r\n\r\n## Why TypeScript:\r\n\r\n* TypeScript is becoming an industry standard. Angular already switched to it (i'm not a fan but ok it's popular). It has support for React / JSX.\r\n* It's actively developed. Anders Heljsberg, a compiler guru that i trust is behind it, remember Pascal, Delphi, C# anyone?\r\n* You can find typings for almost any library in DefinitelyTyped. So no longer need to manually write import code for javascript libraries. (Bridge.Net said they'll probably write an import tool for .d.ts files)\r\n* It's much closer to javascript, so debugging etc. can be easier. Saltarelle is not bad but to provide C# like experience it has to use some boilerplate.\r\n* We won't need a separate Script project, you could put your .ts files under Modules directory, which will get compiled to .js files under Scripts folder\r\n* It's much easier to take an existing javascript code and copy paste it to a TypeScript file.\r\n* It feels like natural javascript with proper refactoring / intellisense / compile time checking\r\n\r\n## Advantages of Saltarelle\r\n\r\n* It looks like C#, more familiar for .NET guys\r\n* Code can be shared by C# / Saltarelle to a certain level (not much actually)\r\n* It has an inline code attribute that can be used to perform tricky things. This is not possible in TypeScript.\r\n* You can use reflection, attributes etc in client side code, which i think is implementable but will not feel so natural in TypeScript.\r\n* Need a parser to transfer script side editors, formatters etc to server side for TypeScript, but i'm not sure if one exists.\r\n* If it is working don't fix it. I may break some things while trying to switch to TypeScript. Loosing trust of some Serenity users is bad while it's yet to become popular.\r\n\r\n## Changes and Compability Considerations\r\n* There won't be a Serene.Script project by default anymore \r\n* Sergen will generate .d.ts files\r\n* Your old code written in Saltarelle will continue to work. I also have a large code base written in Saltarelle, so will strive to keep compability as long as possible (not forever).\r\n\r\nThere may be some points i missed. I'd like to hear your ideas. Thanks."},"comment":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/comments/196738594","html_url":"https://github.com/volkanceylan/Serenity/issues/404#issuecomment-196738594","issue_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/404","id":196738594,"user":{"login":"volkanceylan","id":752470,"avatar_url":"https://avatars.githubusercontent.com/u/752470?v=3","gravatar_id":"","url":"https://api.github.com/users/volkanceylan","html_url":"https://github.com/volkanceylan","followers_url":"https://api.github.com/users/volkanceylan/followers","following_url":"https://api.github.com/users/volkanceylan/following{/other_user}","gists_url":"https://api.github.com/users/volkanceylan/gists{/gist_id}","starred_url":"https://api.github.com/users/volkanceylan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volkanceylan/subscriptions","organizations_url":"https://api.github.com/users/volkanceylan/orgs","repos_url":"https://api.github.com/users/volkanceylan/repos","events_url":"https://api.github.com/users/volkanceylan/events{/privacy}","received_events_url":"https://api.github.com/users/volkanceylan/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T09:26:11Z","updated_at":"2016-03-15T09:26:11Z","body":"@wdhodges It won't affect existing applications using Saltarelle as i can't also afford this. They both transpile to javascript, so in the end they are kinda compatible. Saltarelle has some non-standard behavior for generics, class hierarchy, type checking at runtime etc. so some compability layers between two might need to be developed."}}