{"action":"created","issue":{"url":"https://api.github.com/repos/NumberFour/n4js/issues/266","repository_url":"https://api.github.com/repos/NumberFour/n4js","labels_url":"https://api.github.com/repos/NumberFour/n4js/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/NumberFour/n4js/issues/266/comments","events_url":"https://api.github.com/repos/NumberFour/n4js/issues/266/events","html_url":"https://github.com/NumberFour/n4js/issues/266","id":177390602,"number":266,"title":"Afaics N4JS has no compelling market","user":{"login":"shelby3","id":247731,"avatar_url":"https://avatars.githubusercontent.com/u/247731?v=3","gravatar_id":"","url":"https://api.github.com/users/shelby3","html_url":"https://github.com/shelby3","followers_url":"https://api.github.com/users/shelby3/followers","following_url":"https://api.github.com/users/shelby3/following{/other_user}","gists_url":"https://api.github.com/users/shelby3/gists{/gist_id}","starred_url":"https://api.github.com/users/shelby3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shelby3/subscriptions","organizations_url":"https://api.github.com/users/shelby3/orgs","repos_url":"https://api.github.com/users/shelby3/repos","events_url":"https://api.github.com/users/shelby3/events{/privacy}","received_events_url":"https://api.github.com/users/shelby3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-16T10:18:30Z","updated_at":"2016-09-16T11:12:41Z","closed_at":null,"body":"Per [my reply](https://groups.google.com/d/embed/msg/strengthen-js/611mdeOu2qw/wDDfqQUtAgAJ) to Jens von Pilgrim, I'm interested in (and I have a need for) a more soundly typed JavaScript variant than TypedScript.\r\n\r\nHowever, I am questioning whether some of the design and target market decisions for N4JS can appeal to me or even to anyone who has a similar interest and need?\r\n\r\nMeta: <sub>Please receive my criticisms as constructive, because I want to see what you all have to say and how it influences my logic on this issue. I am not writing this to criticize your admirable effort and technical excellence, but rather to determine how resolve the issues I have which are enumerated below. I am not trying to stomp on anyone's orderly orderliness here (not to insinuate that you all would be upset if I did), rather just being a voice from the outside to stimulate brainstorming about what is the use case and market for N4JS and whether some design decisions should change or not. Apologies given born and raised in the USA, although I have some German ancestry (Hartwick) I don't read or understand the German language, so all communication will need to be in English. Also note my avatar is a joke (myself at age 29), I am age 51 with 34+ years of programming experience. Apology if I start posting so forcefully without getting to know you all first, it is because I am very rushed and lacking time so please don't perceive me as an aggressive troublemaker.</sub>\r\n\r\nI don't understand why I or anyone would to use N4JS instead of GWT (to compile Java) or Scala's Scala.JS compiler? Scala would give me the very desirable brevity of \"everything is an expression\" which [JS doesn't have](https://github.com/Microsoft/TypeScript/issues/10841) (yet).\r\n\r\nBut the reason I don't want to use Scala is because:\r\n\r\n* It is a \"[too many paradigms](https://www.reddit.com/r/scala/comments/4246qc/heres_why_scala_sucks/)\" language with [too many corner cases](https://www.youtube.com/watch?v=TS1lpKBMkgg) of complexity (took me some years to realize this)\r\n* The emitted JS is basically incomprehensible in the browser's JS debugger\r\n* It forces me into a narrow set of IDE tool choices such as Eclipse (which I loathe) or JetBrains. I'm forced to use an IDE even for simple scripts, which is not in the spirit of JavaScript being a light-weight language (which I can edit in a text editor even without linting and test in the browser).\r\n* It doesn't [have typeclasses](https://github.com/Microsoft/TypeScript/issues/10844) and I now think [subclassing is an anti-pattern](http://asserttrue.blogspot.com/2009/02/inheritance-as-antipattern.html) (see also [this](http://c2.com/cgi/wiki?ClassicOoAntiPatterns) and [this](http://programmers.stackexchange.com/questions/137687/why-is-subclassing-too-much-bad-and-hence-why-should-we-use-prototypes-to-do-aw) and [this](http://blog.berniesumption.com/software/inheritance-is-evil-and-must-be-destroyed/))\r\n\r\nSo why would I want to use a Java clone which:\r\n\r\n* emulates Java's lack of brevity, e.g. methods are not `public` by default which is the predominate case. In my experience, [productivity doesn't derive](http://esr.ibiblio.org/?p=7221) from pedantic [orderly orderliness](http://esr.ibiblio.org/?p=4901) tsuris, but rather from paradigms and big picture thinking. I don't want noisy code in the way of seeing the big picture algorithm.\r\n* doesn't offer \"everything is an expression\"\r\n* forces Java's subclassing (an anti-pattern) on me by not offering typeclasses\r\n* forces me into the Java ecosystem of IDEs and even the source code of N4JS has many Java dependencies. Note I have read [the white paper for N4JS](http://www.thinkmind.org/index.php?view=article&articleid=computation_tools_2016_1_20_80013) which I sourced from [Jens' website](http://jevopi.de/publications.html). Whereas, TypeScript's compiler is written in TypeScript.\r\n\r\nWhat I think I want is a soundly typed typeclass language where \"everything is an expression\" which otherwise has a syntax and semantics that is as close to ECMAScript as possible, so that the emitted JS code is comprehensible when debugging in the browser even without source mappings. I want it to be able to interopt with JS's structural typing as well, when I want to use that paradigm instead of typeclasses. And it must be a self-hosted compiler asap, and it should not have any dependencies which are not self-hosted.\r\n\r\nI've searched for such a language and I can't find it. I've found Haskell clones such as PureScript but that deviates too far from JS semantics and forces a Haskell like purity and monadic effect system.\r\n\r\nI think to create a significant enough niche for new programming language, you have to design something that people want which they can't find with a more established choice. Otherwise it is very difficult for you to attract a community of supporters (especially the early adopters) and the network effects that scale up an ecosystem.\r\n\r\nWhat we really need is the simple language I have described above. I think such a language would be incredibly popular over time. And I would certainly become an enthusiastic contributor. Also I would work to popularize such a language by publishing and marketing popular ecosystems that featured this language. I've done million user software more than once in my career. (and I would help to select a more marketable/brandable name than \"N4JS\")\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/NumberFour/n4js/issues/comments/247575764","html_url":"https://github.com/NumberFour/n4js/issues/266#issuecomment-247575764","issue_url":"https://api.github.com/repos/NumberFour/n4js/issues/266","id":247575764,"user":{"login":"shelby3","id":247731,"avatar_url":"https://avatars.githubusercontent.com/u/247731?v=3","gravatar_id":"","url":"https://api.github.com/users/shelby3","html_url":"https://github.com/shelby3","followers_url":"https://api.github.com/users/shelby3/followers","following_url":"https://api.github.com/users/shelby3/following{/other_user}","gists_url":"https://api.github.com/users/shelby3/gists{/gist_id}","starred_url":"https://api.github.com/users/shelby3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shelby3/subscriptions","organizations_url":"https://api.github.com/users/shelby3/orgs","repos_url":"https://api.github.com/users/shelby3/repos","events_url":"https://api.github.com/users/shelby3/events{/privacy}","received_events_url":"https://api.github.com/users/shelby3/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T11:12:41Z","updated_at":"2016-09-16T11:12:41Z","body":"@spion write:\r\n> Sounds like PureScript is a better starting point for you?\r\n\r\n### Use site syntax\r\n\r\nHow can it be a starting point when it doesn't even use parenthesis to tuple the function arguments as JavaScript and C-like languages do? That is so foreign to me, because it requires I know how many arguments each function takes at the declaration site, in order to read the usage of the use site.\r\n\r\n### Global type inference\r\n\r\nPureScript [apparently](https://leanpub.com/purescript/read#leanpub-auto-types-and-type-inference) has global type interface, which I explained to before, [prevents implementation of a typeclass in more than one way](https://github.com/Microsoft/TypeScript/issues/10844#issuecomment-247105684).\r\n\r\nThat is is unacceptable to me and besides I want to declare types on public functions and methods because it maintains binary compatibility of the API when incidental refactoring are done (which in global inference can cause a cascade of inferred type changes every where), which is essential for separate compilation modularity. Haskell (and thus apparently PureScript) breaks all these.\r\n\r\n(to be continued, I need to go eat dinner now...)\r\n\r\n-------\r\n\r\nPureScript's `forall` [higher-ranked types](https://leanpub.com/purescript/read#leanpub-auto-quantified-types) can in some cases [be simulated](https://users.rust-lang.org/t/high-order-function-with-type-parameter/3112/2) with `interface` (or `trait`) method type parametrization."}}
{"actor":{"display_login":"shelby3"}}