r/programming • • Jul 18 '16

Web programming is getting unnecessarily complicated

http://en.arguman.org/web-programming-is-getting-unnecessarily-complicated
324 Upvotes

258 comments sorted by

View all comments

Show parent comment

0

u/MikhailEdoshin Jul 19 '16

huge unreadable javaScript file

... and undebuggable :) I personally dropped webpack and babel with their nice .jsx syntax for React and write plain JavaScript. It's both faster (save the file and reload the page) and I can see real line numbers if there's an error.

It turned out to be quite good even though React calls are now more verbose. Syntactic sugar is overrated :)

12

u/IbnZaydun Jul 19 '16

Or you could have your build tool generate a map for your compiled JS and have both a nice compressed artifact, debugging and JSX.

-1

u/MikhailEdoshin Jul 20 '16

I.e. to add more complexity to solve the issue? :) No thanks. I usually prefer to try the other direction first: to remove complexity to solve the issue. If the result works for me, then I keep it this way. (Judging from this discussion this is kinda unconventional.)

6

u/useablelobster Jul 19 '16

If you are using a build process you can normally generate map files, which allow debugging of the pre-processed files.

Compiling typescript to es6, and then transpiling it to es5, while debugging the typescript files is a thing. The debugging isn't perfect though, chrome gets confused with captured this references in arrow functions, but it's still very useful.