The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

298515 (1) [Avatar] Offline
#1
hello,

I am reading the 1st chapter.
I am not sure wether it is the best option to indicate all differences between elm and Javacript, with table comparing the syntax or capabilities on Javacript and elm.

I personnally think that a book on elm should be focused on elm. It will avoid some possible confusion, and make the book more concise.

I would go straight to the point, and describe elm.

For users with a JS background, I think the differences will become obvious.

For users with no JS background, they don't care.

That's a suggestion, but the other readers have perhaps diffferent opinions. We should ask.

Regards,
nicolas
barruumrex (3) [Avatar] Offline
#2
I personally like the comparisons to JavaScript. They simultaneous illustrate the differences between Elm and JS as well as the differences between OO and FP. It also serves to ground the examples with references that almost everyone picking up this book will recognize.
rtfeldman (60) [Avatar] Offline
#3
Thanks for the feedback! I have heard several readers express appreciation for those comparisons, so I think it makes sense to keep them for now. smilie
415656 (1) [Avatar] Offline
#4
Perhaps the JavaScript-stuff can be put in an appendix or something? It's perhaps a bit disruptive to the flow of the book as it is now.
alexb (13) [Avatar] Offline
#5
My vote would be to lose the JavaScript references or at least tone them way down once you get past the beginning and people have been introduced to the elm language. There are plenty of books about JS, not so for elm
Frank Schmitt (5) [Avatar] Offline
#6
I like the Javascript comparisons (even if my Javascript background is very weak).

What I found confusing is that the ordering of Javascript / Elm is inconsistent:

in "Table 1.2 String Functionality Comparison", "Table 1.4 Contrasting Javascript Arrays and Elm Lists" and "JavaScript Object vs Elm Record“, Javascript is on the left, and Elm is on the right
in „Table 1.6 Differences between Elm and JavaScript", it's the other way around

So I'd suggest to flip the ordering in Table 1.6 and always place Javascript on the left and Elm on the right
tempusfugit (144) [Avatar] Offline
#7
298515 wrote:For users with no JS background, they don't care.

I recently came across Erik Meijer's tagline "Static Typing Where Possible, Dynamic Typing When Needed" which can easily be re-purposed as "Use Elm Where Possible, JavaScript When Necessary" to describe Elm's situation for some time to come. I think it's unrealistic to expect that Elm will enable anyone to completely avoid JavaScript in the browser.

Furthermore @elm_in_action:
I assume readers know a bit of JS.

To me this expresses the expectation that the primary target audience of the book will be front end developers of varying skill levels to whom browser based JavaScript is the primary frame of reference for interacting with the browser. From that perspective it makes perfect sense to use JavaScript as the reference point for the journey to Elm.

And with some luck Elm exposure may even have a positive impact on the code quality of the "JavaScript When Necessary".
375300 (1) [Avatar] Offline
#8
In chapter 1, the comparisons have JS on the left, Elm on the right.
In table 2.1, JS is on the right and Elm on the left.

Not sure if this swap is intended.

catinthetap (3) [Avatar] Offline
#9
I was reading this on the way in this morning and On kindle (mobi) Tables 1.4 (Lists) and 1.4.2 (Records) the JS and Elm examples flow into one another and it's really confusing to read. I kept thinking I was seeing some new Elm syntax and then realised it was actually part of the JS example.
33282 (3) [Avatar] Offline
#10
The mix of Elm and JavaScript is very confusing - it should be handled in a separate chapter or even better in the appendix.
440031 (2) [Avatar] Offline
#11
Read above of comment on separation of 2 columns, another option > create different color backgrounds where js would represent yellow and/or elm is green

if geared towards accessibility with the book 2 columns still makes sense but could also be done with inverting colors for background and font
434429 (3) [Avatar] Offline
#12
I like the comparison, and I find it useful especially for beginners.

Also keep in mind that the majority of people interested in Elm are either front-end or full-stack developers, thus they will know Javascript as first or at least second language.
Richard Haven (8) [Avatar] Offline
#13
Perhaps putting the comparisons in a shaded box so it's clear why they are there.

I like the comparisons as they confirm why I dislike JS as the second-worst development language in common usage <s>