Topic awaiting preservation: Did you know that? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: USA |
posted 08-26-2004 14:57
I like Javascript lots. code: var foo = [function(a) { return 2 * a; }, function(a) { return a * a; }]; Works just dandy. code: var bar = { fred: function(a) { return 2 * a; }, wilma: function(a) { return a * a; } }; Works great too. code: var baz = { Works wonderfully too. code: function foo(n) { o.o!!! code: function foo(n) { Works perfectly as well. |
Nervous Wreck (II) Inmate From: |
posted 08-26-2004 16:22
I didn't know it had anonymous functions - who wants to write a lisp interpreter in JS? |
Obsessive-Compulsive (I) Inmate From: Umeå, Sweden |
posted 09-04-2004 04:04
Waldemar Horwat once called JavaScript for "another syntax for CommonLISP". And he should know, he's the editor of the ECMA-262 standard and one of those that truly understand how it works, inside out. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 09-04-2004 04:57 |
Nervous Wreck (II) Inmate From: Umeå, Sweden |
posted 09-04-2004 16:18
Oh, ECMAScript is used in a fair number of other situations. The Mozilla browsers are made partially in ECMAScript. The ActionScript implementation found in Macromedia Flash is ECMAScript. Adobe PDF supports EScript scripting which is ECMAScript based. The Adobe SVG Viewer is of course EScript powered. ASP has JScript as a server side language. The Windows Scripting Host supports JScript. Microsoft's .NET platform has JScript.NET (a partial implementation of the upcoming ECMA-262 4ed standard). Avalon in Longhorn will support JScript.NET as one of it's primary scripting languages. On the Mac we have Konfabulator and the upcoming Apple Dashbord as widget facilities. The Apache foundation uses Mozilla's Rhino engine for some of their projects. The Sun/Netscape ONE server platform allows JavaScript as a server side scripting language. Caucho Resin allows compilation of JavaScript into Java bytecode. And I'm sure there are other places it's used that I haven't thought of. |
Maniac (V) Inmate From: Lebanon |
posted 09-09-2004 09:18
Slime, yes, I wish that too...the freedom it gives you while programming, as compare to high level languages. |
Paranoid (IV) Inmate From: Dublin, Ireland |
posted 09-09-2004 23:11
IW: Nope, no, I didnt know. |
Nervous Wreck (II) Inmate From: Umeå, Sweden |
posted 09-09-2004 23:55
Actually, the only concepts used in those examples are untyped arrays and first class functions. Two of a number of concepts that originated in LISP. However, recursion is a concept that JavaScript doesn't do right - JavaScript is not properly tail recursive. A properly tail recursive language performs stack call elimination, meaning that calls are not placed on a stack of wrapped function calls, but instead serially executed. See Wikipedia: Tail Recursion for more info. code: circ(){ would be equivalent to the following code: while(true)
|
Bipolar (III) Inmate From: |
posted 09-10-2004 01:09
Keeping with Asylum tradition, I'm tangentializing. |
Paranoid (IV) Inmate From: Back in West Texas... How disappointing |
posted 09-10-2004 01:47
The only Lisp I've seen was when I was working in Iowa this summer. They just bought Auto-CAD2004, with an add-on called AutoCrete, which was written in AutoLisp. I poked around in the source a bit because I was curious, but either there was a lot more that I couldn't find, or I don't understand how it works at all (which is entirely possible). But the whole add-on was poorly written, with hundreds of bugs, a lot of which were merely irritating, but some a lot worse. |
Paranoid (IV) Inmate From: USA |
posted 09-10-2004 02:18
Lisp is a powerful programming language that is functional, instead of procedural or object-oriented. It's code is easily identiable by the ridiculous number of parenthesis it uses. I don't understand it too well, mostly because functional programming has a lot of concepts that tangle your head in knots. I'm trying to learn it, anyway... |
Nervous Wreck (II) Inmate From: Umeå, Sweden |
posted 09-10-2004 05:39
LISP is only one language (Fortran, if you must know) away from being the oldest high level language in use (i.e. that is neither machine code, assembly nor any other langauge that translates directly form and to machine code). It's core concepts and syntax is small, making for a very highly abstracted language. It's basic syntactical units are so-called S-expressions and symbols, it's basic value types are atoms and lists. This sparsity in concepts makes it at the same time a very powerful language. This expressiveness and power has gradually made it's way into modern languages, to the point that for example Ruby and Python are very closely related to LISP conceptually. (And if you look at two other conceptually very clean languages, APL and SmallTalk have also contributed considerably to modern languages.) |
Bipolar (III) Inmate From: |
posted 09-10-2004 15:31
Well, thanks to all three of you. |