It's a fact: no one likes to code in Javascript, but it's the only programming language used by web browsers and new engines like V8 are fast as hell.
There are things like CoffeeScript and Fly to translate to JS, but translating one scripting language to another is shitty...
Let's say that you work on the Google Chrome Developers team and you can propose a new scripting language. There was another thread on /prog/ about using LISP, but let's be more realistic in this thread. The new language would be also implemented on V8.
So, what programming language would you propose?
Name:
Anonymous2012-07-22 12:07
Scheme.
Name:
Anonymous2012-07-22 12:24
Javascript.
Name:
Anonymous2012-07-22 12:35
Haskell with JSON integration.
Name:
Anonymous2012-07-22 12:44
It's syntax is not friendly.
Paranscript is a much better alternative if you're forced to write JS.
Realistically, Python, because it's good enough while still being simple so that web devs would be able to use it.
Ideally, a Lisp dialect. The simple parsing would be quite useful and it could be machine-generated. Possibly based on Scheme, since functional programming would additionally speed it up with caching.
Some sort of low-level bytecode that can easily and efficiently be compiled to native code or interpreted, that can have multiple frontends. Somewhat like Flash. What? We have that already? But seriously: what would be the point in forcing the coder to use language XYZ instead of JS? Then you could open the thread 'Everybody hates XYZ'. Why not let the web-coder decide which language s/he wants to use instead?
Name:
Anonymous2012-07-22 13:49
Do you remember TCL?
Name:
Anonymous2012-07-22 13:51
I actually like JS to mess around with
Name:
Anonymous2012-07-22 14:19
WMLScript
Name:
Anonymous2012-07-22 16:45
Smash the chains of JavaShit language slavery. Web programmers should have freedom of choice.
Name:
Anonymous2012-07-22 17:23
<script type"application/GNUScript">
;; Emacs lisp code here
</script>
Name:
Anonymous2012-07-22 17:48
>>12
you're allowed to choose any language you want as long as it's javascript
There are custom builds of Chromium that use the Dart VM. You can load your web application as compiled binary directly rather than having to be JITed or however the browser does it. Although it can be translated to Javascript, the ultimate goal is to get Dart to replace JS. JS was never designed to do what is being done with it.
>>17 javashit's gc semantics don't match those of hosted language, or it won't allow you to do this or that for "security reasons" implement a gc, in javascript, on top of the existing gc
gc is shit
>>23
Hush little lambdas, do your calculus and don't say a byte.
Momma's gonna buy you a SICP reading dog.
Name:
Anonymous2012-07-23 7:02
I have heard a number of times that Javascript is based on Scheme. I have programmed in both Javascript and Scheme for years, and never found any similarity. Anyone care to explain?
>>25
I think it's because the bag-of-properties datatype is ubiquitous in JS' badly designed prototype-based OO system.
JSers think that since in Scheme everything is a list, that's somehow related.
>>26
But a lot of other languages have lexical closures (along with the bag of related problems), to name a few: Perl, Python, every Lisp, Ruby, even C with GCC extensions (can work if you don't mess up the stack before calling your closure).
>>25
javascript has rich support for emerging web technologies like numerical towers, tail-call elimination, code-as-data, an expressive and powerful macro system, closures, and a thought-out development process without corporate influence
Name:
Anonymous2012-07-23 15:43
My own, it has no braces, no parenthesis, no semicolons, and looks like this:
$ onload func
alert "Hello World"
for $ a int 0, a < 10, a++
alert "SPAMM!!!"
people hate Javascript and yet no one has come close to producing a language that can replace it. Dart fails simply because no one wants static typing in a scripting language.
Name:
Anonymous2012-07-23 16:35
>>34
i'm sure mozilla would love a javascript replacement seeing as it's inventor is their cto
Name:
Anonymous2012-07-23 17:07
>>35
Mozilla has a very impressive amount of talent considering the company makes all open source software free of cost. Mozilla is derived from Netscape which is derived from Mosaic. Mosaic was designed by students at the University of Illinois Urbana-Champlaine, a very top tier CS college. Many of these students went on to work for Netscape which became Mozilla. If you look at the wikipedia page for Firefox you'll see it was developed by top-rate programmers. And of course the people at Mozilla are working on Rust, which looks to be much more capable than Dart.
Name:
Anonymous2012-07-23 17:07
REPLACE HTML BY S-EXP
REPLACE JS BY SCHEME
REPLACE THE CSS LAYOUT BY LATEX'
Name:
Anonymous2012-07-23 17:08
>>36
It should be mentioned that Mosaic is not just another browser, it invented much of the technology in browsers that we take for grated today.
Name:
Anonymous2012-07-23 17:11
REPLACE HTML BY S-EXP
already being done with JSON
REPLACE JS BY SCHEME
wont happen
REPLACE THE CSS LAYOUT BY LATEX
CSS does have to be replaced and a universal document code like Latex is a good place to start.
Name:
Anonymous2012-07-23 17:12
>>36
i don't think rust is being developed as a javascript replacement
Name:
Anonymous2012-07-23 17:17
REPLACE JS BY SCHEME
it should be noted that Jamie Zawinski worked on Netscape, he is an expert Lisp programmer who made XEmacs (most of the improved code in XEmacs got put back into GNU Emacs). Jamie is a dedicated C programmer who was against the idea of switching to C++.
Name:
Anonymous2012-07-23 20:38
>>40
right, its not, its meant to replace C++, and I hope they succeed because FF is a posterchild for C++ memory leaks
>>44
Im pretty sure that is not true as I have read interviews of Mozilla programmers talking about using OO style throughout. Since Firefox is open source Im sure there is info somewhere describing exactly the style of programming used.