pouët.net

Go to bottom

Javascript as a "serious" development language?

category: general [glöplog]
As Joghut said, JS is a prototype based language with loose typing. It can be confusing for some people.

Weyland Yutani : That's the oldschool way of drawing triangles. People should really use SVG or Canvas for that.
added on the 2009-02-28 13:46:05 by p01 p01
added on the 2009-02-28 16:00:36 by LiraNuna LiraNuna
"MochiKit makes JavaScript suck less", or so they say. The interesting screencast video also covers the broken comparators as pointed out by Joghurt.
added on the 2009-02-28 16:22:57 by noname noname
noname, unfortunately, the sucking only starts there...
Code: var js = "sucks"; new function () { alert(js); // guess what's alerted if you uncomment the next line // var js = "omg"; }();
added on the 2009-02-28 17:28:44 by Joghurt Joghurt
does javascript have printf?
added on the 2009-02-28 18:11:56 by neoneye neoneye
BB Image
added on the 2009-02-28 23:12:19 by psykon psykon
A coworker of mine is a total JavaScript fanboy. He codes everything in JavaScript, including servers.

He's the author of Joose, a framework which is supposed to make object-oriented programming in JavaScript a lot easier. According to him, it pretty much fixes everything that normally annoys you about JavaScript. I don't really have any experience with it, so I don't know if that's true.
added on the 2009-03-01 02:31:46 by cyraxx cyraxx
Javascript is not a serious coding language because you can't save or load files with it :(
added on the 2009-03-01 10:11:12 by Kodoichi Kodoichi
Code: function reduce(fn, a, init) { var s = init; for (i = 0; i < a.length; i++) s = fn( s, a[i] ); return s; } function sum(a) { return reduce( function(a, b){ return a + b; }, a, 0 ); } function join(a) { return reduce( function(a, b){ return a + b; }, a, "" ); }


Quote:
Many older languages simply had no way to do this kind of stuff. Other languages let you do it, but it's hard (for example, C has function pointers, but you have to declare and define the function somewhere else). Object-oriented programming languages aren't completely convinced that you should be allowed to do anything with functions.


Right. So that's an article praising Javascript by comparing it to languages older than C (and only SOME of the languages older than C, mind), downplaying the fact that you CAN do it in C, C++, Java, C#, and just about any other language, too, with the only difference being the inline functions. I guess the example is a ridiculously simple one because anything more complicated would illustrate how messy inline function declarations can become.

He even runs into the problems of loose typing in his example and brushes it aside because he wants to show that Javascript rules, not that it sucks. What it boils down to, it seems, is that abstraction is good, because then you can optimise a core set of shared functionality and many other parts of the system benefit from that. Well duh.
added on the 2009-03-01 11:53:29 by doomdoom doomdoom
But I agree with him that CS students would be better off if they learned just JS instead of just Java.

Not that learning only one language is good, but nowadays it seems to be the case that you can get a CS major without ever touching anything else but Java in an IDE. There are people out there that can't even compile their fucking programs using just the console.

Worse even, most former CS students I know never even heard of Coroutines... I did, and I never studies CS; I just looked at other languages than C(++)

</rant>
added on the 2009-03-01 12:02:20 by Joghurt Joghurt
C++ should adopt the way js handles classes... For real...

Wow the price of crack really dropped this year, wich is a good thing for me...
added on the 2009-03-01 13:03:57 by LovCAPONE LovCAPONE
Well, coroutines produce neater code in certain situations, but so does goto. Neither is strictly necessary, though, and both require some discipline and understanding to do less harm than good. I think the basic problem is that there isn't enough time in a CS degree to teach a useful amount of CS to complete newcomers, yet the educations tend to be aimed at people who've never written a line of code before.

If the students all had prior experience you probably could go through a whole lot of programming paradigms and techniques, as well as a bunch of different languages, but since you can't make that assumption about the students, you end up looking for the single "best" paradigm to teach, which is inevitably OOP, and the one language that most clearly expresses that paradigm while being somewhat industry-standard, which is Java.
added on the 2009-03-01 13:09:14 by doomdoom doomdoom
6502 compatible assembler and emulator in javascript: http://www.6502asm.com/
added on the 2009-03-01 16:59:45 by pera pera
I took a CS course in two years here in france, and i learnt assembly (RISC, on a java simulator), ADA, Java, C++, C, and Scheme, that is imperative/procedural, object, and functionnal programming. Starting from "how to use a mouse" (or almost that).
that joose thing is pretty cool. i think i'm going to use it.
added on the 2009-03-01 20:14:56 by skrebbel skrebbel
would the lively kernel be considered serious use?
http://livelykernel.sunlabs.com/legacy/0.8.5/index.xhtml

i'd like to see a demo done on top of this
added on the 2009-03-01 21:59:14 by chanman chanman
chanman: I guess not :) 100% cpu load and still only 10fps max on my 2,8Ghz Intel
added on the 2009-03-01 22:04:53 by xyz xyz
hermes: i can't argue that though the "big guys" (apple, google) are making webkit's js engine faster
added on the 2009-03-01 22:17:01 by chanman chanman
chanman: The day they manage to get it running with almost idle CPU usage I'll stop complaining :)
added on the 2009-03-01 22:25:22 by xyz xyz
(and I'm using Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6, btw)
added on the 2009-03-01 22:27:17 by xyz xyz
what hermes said.
added on the 2009-03-01 22:28:07 by torus torus
That lively thing was painfully slow and eventually it completely b0rked my firefox :(
added on the 2009-03-02 01:14:54 by doomdoom doomdoom
so lively isn't so lively in firefox : /
added on the 2009-03-02 06:09:51 by chanman chanman

login

Go to top