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

9

u/[deleted] Jul 18 '16
  • We can get away from javascript
  • All turing complete languages can do anything
  • Reasons can be fixed

10

u/minno Jul 18 '16

All hail webassembly!

5

u/stesch Jul 18 '16

AFAIK you can't access the DOM from WebAsm.

4

u/minno Jul 18 '16

I'm pretty sure they're planning it, it's just not in the current test implementations.

5

u/_zenith Jul 18 '16

Yep. It would be utter madness to try and introduce a JS replacement that couldn't access the DOM

6

u/[deleted] Jul 18 '16

WebAssembly's own FAQ states that they're not trying to replace Javascript:

WebAssembly is designed to be a complement to, not replacement of, JavaScript.

That seems like a mistake to me. I'm worried if or when it eventually starts replacing JS that it won't have been designed for it (like accessing the DOM, for example) and we'll wind up with another mess.

4

u/_zenith Jul 19 '16

Yep fully agreed. It feels a bit like they said that so JS proponents don't fight it tooth and nail. It possibly felt like a pragmatic choice at the time of their writing it.

I fully expect that they will transition away from this... Or WebAssembly will die (because why even bother then)

2

u/[deleted] Jul 18 '16 edited Jul 18 '16

hopefully, hopefully. one day I want to write browser code in something OCamly edit: yes I know you can do this now with Fable, etc among other things. sort of.

1

u/tdammers Jul 18 '16

FWIW, there's a few Haskell-y languages that are pretty close to being realistic candidates: PureScript, Elm (although that one has a bit of a kindergarten feel to it), and Haskell itself (through GHCJS)...

5

u/tdammers Jul 18 '16

All turing complete languages can do anything

By that logic, we should all be coding in Brainfuck or INTERCAL. Programming language choice has never really been about Turing Completeness, because it's actually quite difficult to design a language that is accidentally Turing incomplete - it is a lot more common to design a language that should be Turing incomplete and have it come out Turing complete by accident: CSS3, most modern SQL flavors, C++ templates, and PostScript, are famous examples.

1

u/[deleted] Jul 19 '16

that's the joke, but in reverse.

2

u/[deleted] Jul 19 '16

Alternative idea, a big name browser like Chrome picks a better candidate for browser-language similar to JS, like say, Lua (please god make it so) and much joy would be had.

Although I would love web assembly, it's taking so fucking long.

3

u/[deleted] Jul 19 '16

oh man lua would be pretty nice. even javascripters would like it.