Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Javascript replacing Java? Date: Mon, 15 May 2017 19:08:49 -0400 Organization: Aioe.org NNTP Server Lines: 53 Message-ID: References: <75947fa8-5d0c-415c-b2f1-78ccd38293a3@googlegroups.com> NNTP-Posting-Host: PBuS014lhzVyHjLbXmo/ZQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:36628 On 5/15/2017 7:55 AM, Martin Gregorie wrote: > I had a brief tussle with JavaScript and gave up on it because: > > 1) I like strongly typed languages because I appreciate the compile-time > error checking that these languages support. I like strongly typed language also (in fact I like those even more strongly typed than Java). But different contexts require different solutions. I don't think it makes sense to require strong typing in all contexts. In fact I am pretty sure that your favorite shell script language is not strong typed. If you want JavaScript with strong typing then use TypeScript, then you can have strong typing (I believe there is a command line option to disable implicit any) and it gets transpiled to regular JavaScript. > At the time I tried it, > JavaScript seemed to have a policy of leaving all error detection until > the flawed statement was actually executed. Of course, this has major > implications for unit test coverage, but somehow I doubt that this is > widely understood. > > Even awk, a traditional UNIX scripting language with a compile-and-go > style of runtime interpreter has always been much better at error > detection than JavaScript was in my experience. I am not a JS guy so I can not offer any advice here. > 2) I learn languages best by reading books but I was utterly unable to > find even a barely adequate book on JavaScript. The O'Reilly book I > eventually ended up with was one of their worst, little more than a > recipe book for JavaScript fragments. It had no satisfactory description > of the language constructs and syntax. Even comp.lang.javascript was > unable to suggest a good book. Given that JavaScript is one of the worlds most widely used languages, then I would have expected there to be some good books. I would definitely look for totally new books. Old books or revisions of old books will probably focus on 00's client side JavaScript code. But again I am not qualified to suggest a specific book. Arne