'. '

JavaScript

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(Every Generation Needs Its Own Assembler!)
Line 1: Line 1:
[[wikipedia::JavaScript|JavaScript]] was for a long time considered an outsider language. However its presence in browsers and its ability to give [[HTML]] pages ''life'' makes it more and more attractive. But let's be honest - [[JavaScript]] is weird and nobody would use it, if it hadn't had its ''browser presence'' advantage. Using [[JavaScript]] is [[impossible]] - maybe not [[impossible]] in the [[impossible|finite automata sense]], but certainly as [[impossible]] as [[ImpossibleThreading|getting threading right]].
[[wikipedia::JavaScript|JavaScript]] was for a long time considered an outsider language. However its presence in browsers and its ability to give [[HTML]] pages ''life'' makes it more and more attractive. But let's be honest - [[JavaScript]] is weird and nobody would use it, if it hadn't had its ''browser presence'' advantage. Using [[JavaScript]] is [[impossible]] - maybe not [[impossible]] in the [[impossible|finite automata sense]], but certainly as [[impossible]] as [[ImpossibleThreading|getting threading right]].
 +
 +
== Yet Another Assembly Language ==
 +
 +
In 2015 [[JavaScript]] is a famous target ''instruction set'' (just like [[wikipedia:Z80|Z80]] or [[wikipedia:i386|i386]]). Many languages compile to it. The reason is simple: if you want your program run everywhere, you need it to run in a browser and [[JavaScript]] is the language all modern browsers speak. As such we have a way to translate [[C]] (via [[Asm.js]]) to [[JavaScript]] as well [[Java]] (via [[I|my]] [[bck2brwsr]] [[VM]]).
== Every Generation Needs Its Own Assembler! ==
== Every Generation Needs Its Own Assembler! ==

Revision as of 09:24, 9 January 2015

JavaScript was for a long time considered an outsider language. However its presence in browsers and its ability to give HTML pages life makes it more and more attractive. But let's be honest - JavaScript is weird and nobody would use it, if it hadn't had its browser presence advantage. Using JavaScript is impossible - maybe not impossible in the finite automata sense, but certainly as impossible as getting threading right.

Yet Another Assembly Language

In 2015 JavaScript is a famous target instruction set (just like Z80 or i386). Many languages compile to it. The reason is simple: if you want your program run everywhere, you need it to run in a browser and JavaScript is the language all modern browsers speak. As such we have a way to translate C (via Asm.js) to JavaScript as well Java (via my bck2brwsr VM).

Every Generation Needs Its Own Assembler!

The history of mankind is repeating. In circles. Yet, according to Karl Marx it is repeating in spiral - the new generations are about to do the same mistakes as the previous ones, just on new, hopefully, higher level. A bit too optimistic conclusion, but as far as JavaScript goes, probably true.

I learned programming while coding in the Karel language. But it felt not like a real programming language, Karel was a programming language for children. Still, everything I ever learned about programming I owe to Karel. Those who know the two sides essay by Dijkstra can imagine what was my computer to execute my programs. Yes, I was simulating all the computations in hand. How does a computer of young generation looks like? Right, it is a browser. And JavaScript runs naturally in a browser. What kind of impact this can have on like-to-be-programers?

Every Generation Needs to Repeat Previous Mistakes

Tim Boudreau: really get the feeling JavaScript guys are trying to replay the last 20 years of server-side development, but inside a browser window, and feel like they have to make every mistake again for themselves.

Tim Boudreau: 90% of the project's problems come from broken attempts to modularize *inside* a giant single HTML page application, and not being able to actually keep things from interfering with each other. I believe in modularization, but I also think the web comes with a great tool for modularization, and its called web pages.

Me: That is result of missing encapsulation. There is not much of it in JavaScript - only require.js comes to my mind.


TBD

Personal tools
buy