Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Everybody hates Javascript

Name: Anonymous 2012-07-22 12:05

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: Anonymous 2012-07-22 12:07

Scheme.

Name: Anonymous 2012-07-22 12:24

Javascript.

Name: Anonymous 2012-07-22 12:35

Haskell with JSON integration.

Name: Anonymous 2012-07-22 12:44

It's syntax is not friendly.

Paranscript is a much better alternative if you're forced to write JS.

Name: Anonymous 2012-07-22 13:06

perl6

Name: Anonymous 2012-07-22 13:19

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.

Name: Anonymous 2012-07-22 13:23

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: Anonymous 2012-07-22 13:49

Do you remember TCL?

Name: Anonymous 2012-07-22 13:51

I actually like JS to mess around with

Name: Anonymous 2012-07-22 14:19

WMLScript

Name: Anonymous 2012-07-22 16:45

Smash the chains of JavaShit language slavery. Web programmers should have freedom of choice.

Name: Anonymous 2012-07-22 17:23

<script type"application/GNUScript">
;; Emacs lisp code here
</script>

Name: Anonymous 2012-07-22 17:48

>>12
you're allowed to choose any language you want as long as it's javascript

Name: Anonymous 2012-07-22 18:46

Dart

http://www.dartlang.org/

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.

Name: Anonymous 2012-07-22 19:13

>>15
class-based
back to 1995, please.

Name: Anonymous 2012-07-22 19:55

Come on! Compile your favorite language to JS and shut up!

Name: Anonymous 2012-07-22 22:24

>>15
No

Name: Anonymous 2012-07-23 1:02

>>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

Name: Anonymous 2012-07-23 1:05

>>19
fuck off, cockshit

Name: Anonymous 2012-07-23 1:39

>>20
go scrub a toilet, dog rocket

Name: Anonymous 2012-07-23 3:44

>>21
check my garbage-collected doubles, fagface

Name: Anonymous 2012-07-23 4:34

Hush little lambs, do your calculus and don't say a word.
Momma's gonna buy you a SICP reading bird.

Name: Anonymous 2012-07-23 6:50

>>23
Hush little lambdas, do your calculus and don't say a byte.
Momma's gonna buy you a SICP reading dog.

Name: Anonymous 2012-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?

Name: Anonymous 2012-07-23 7:07

>>25
Javascripters like to think that lexical closures make their language Lispy or well-designed.

Name: Anonymous 2012-07-23 7:12

>>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.

Name: Anonymous 2012-07-23 7:20

>>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).

Name: Anonymous 2012-07-23 10:50

>>28
GCC extensions

LEL

Name: Anonymous 2012-07-23 12:39

>>29
I sense a dverak typo-ist

Name: Anonymous 2012-07-23 13:22

>>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: Anonymous 2012-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!!!"

Name: Anonymous 2012-07-23 16:17

>>32
terrible!

Name: Anonymous 2012-07-23 16:21

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: Anonymous 2012-07-23 16:35

>>34
i'm sure mozilla would love a javascript replacement seeing as it's inventor is their cto

Name: Anonymous 2012-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: Anonymous 2012-07-23 17:07

REPLACE HTML BY S-EXP
REPLACE JS BY SCHEME
REPLACE THE CSS LAYOUT BY LATEX'

Name: Anonymous 2012-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: Anonymous 2012-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: Anonymous 2012-07-23 17:12

>>36
i don't think rust is being developed as a javascript replacement

Name: Anonymous 2012-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: Anonymous 2012-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

Name: Anonymous 2012-07-23 22:43

>>42
What about my not, my meant to replace C++?!

Name: Anonymous 2012-07-24 0:43

>>42
Because Mozilla doesn't write C++. They write C-style C++, which is just as prone to C-style errors (like mem leaks) as C.

Name: Anonymous 2012-07-24 2:40

>>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.

Name: Anonymous 2012-07-24 3:38

>>45
Im
Is this a friend of Ive?

Don't change these.
Name: Email:
Entire Thread Thread List