Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4 ... 6
  ignore  |  Print  
  JavaScript is a scam  (Read 12799 times)
0 Members and 1 Guest are viewing this topic.
Offline JL235

JGO Coder


Medals: 10



« Reply #30 - Posted 2011-11-03 20:26:15 »

Funny, I use JavaScript daily and run a single-page-app framework with thousands of lines of code and I'm using classes. Seems to work just fine. And it's not a regular web page app, it's designed for television, meaning all input interaction must be coded and handled in code.

Just because you don't know better doesn't make JavaScript bad, there are tons of libraries out there, frameworks, etc. that can help tremendously.

You can't be using classes, because Javascript doesn't have them. You are using a hack you think it is smart because nobody else noticed how much time you waste with this crap yet.
Have you even looked at libraries like JS Class?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
var Animal = new JS.Class({
    initialize: function(name) {
        this.name = name;
    },

    speak: function(things) {
        return 'My name is ' + this.name + ' and I like ' + things;
    }
});

var Dog = new JS.Class(Animal, {
    speak: function(stuff) {
        return this.callSuper().toUpperCase() + '!';
    },

    huntForBones: function(garden) {
        // ...
   }
});

Looks very neat and tidy, and even supports standard things like calling super methods, interfaces, hooks for meta programming, full reflection for it's OO system, and being able to attach Ruby style blocks onto methods.

That's really the point of JS, that you can build something like this.

Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #31 - Posted 2011-11-03 20:55:30 »

You can have something like classes and you can have inheritance, mixins, traits, and all that other stuff.

Personally, I really like JavaScript. Well, OK. Function scope is completely retarded and there were a bunch of other bad decisions being made, but it's lots of fun nonetheless. It doesn't scale that well though. I wouldn't want to work on a JS project with >5kloc.

I also think that Dart is kinda neat in theory. I just can't see it succeed. I mean, even if Chrome would get >50%, it would look pretty bad for Dart. Chrome + Android + Chrome OS + server-sided Dart... maaaaybe. Still somewhat weak.

弾幕 ☆ @mahonnaiseblog
Offline krasse
« Reply #32 - Posted 2011-11-03 22:55:45 »

I once hated JS but now I actually like it when I finally learned about the "crappy" design patterns to simulate inheritance.
Just wanted to make an important contribution to this thread Wink

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #33 - Posted 2011-11-03 23:25:58 »

I still think that the crux of the issue is the fact that you're forced to use it whether you want to or not. I think I might have said in another thread it's like telling everybody they've got to speak French from now on. It's not that there's anything wrong with French or that it's a crap language - it's the fact that I'm an English speaker.

Cas Smiley

Offline ra4king

JGO Kernel


Medals: 341
Projects: 2
Exp: 5 years


I'm the King!


« Reply #34 - Posted 2011-11-04 00:19:17 »

It's not that there's anything wrong with French or that it's a crap language
hmmmmm are you implying that French is a crap language? Wink

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 748
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #35 - Posted 2011-11-04 00:22:10 »

It's not that there's anything wrong with French or that it's a crap language
hmmmmm are you implying that French is a crap language? Wink
[It's not that there's anything wrong with French] or [It's not that it's a crap language]

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline theagentd
« Reply #36 - Posted 2011-11-04 00:32:18 »

Did you know French can be pronounced using Java! You'll just have to use substring on each word to remove a random number of letters at the end of each word. About 1-3 should be fine.
[/joke]
French for non-French people!

Myomyomyo.
Offline longino

Junior Member


Medals: 1



« Reply #37 - Posted 2011-11-04 00:39:23 »

Looks very neat and tidy, and even supports standard things like calling super methods, interfaces, hooks for meta programming, full reflection for it's OO system, and being able to attach Ruby style blocks onto methods.

That's really the point of JS, that you can build something like this.

First, it is a hack, not a language feature.

Second, the very existence of it is evidence of crappiness of Javascript. Why go through such trouble if you can get it for free in other languages?

Third, no, it doesn't look good.

Manual labor is not intelligence. We shouldn't have to build something like this, it should be part of the language.
Offline theagentd
« Reply #38 - Posted 2011-11-04 00:54:37 »

Looks very neat and tidy, and even supports standard things like calling super methods, interfaces, hooks for meta programming, full reflection for it's OO system, and being able to attach Ruby style blocks onto methods.

That's really the point of JS, that you can build something like this.

First, it is a hack, not a language feature.

Second, the very existence of it is evidence of crappiness of Javascript. Why go through such trouble if you can get it for free in other languages?

Third, no, it doesn't look good.

Manual labor is not intelligence. We shouldn't have to build something like this, it should be part of the language.

1. Find a pool.
2. Cool off.
3. Huh
4. Profit for everyone at JGO!

But seriously, you can say what you want about Javascript, but it's not really relevant or interesting here. I haven't done any Javascript, but from what I've heard I don't think I like it either. xD

Myomyomyo.
Offline lhkbob

JGO Knight


Medals: 32



« Reply #39 - Posted 2011-11-04 01:31:44 »

Obvious troll is obvious, but I'm falling for it anyway.  Your arguments make no sense.  OO and functions are all just hacks, clearly we should program in assembly because, God forbid if we had to build something onto a language in order to make it usable.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sproingie

JGO Kernel


Medals: 202



« Reply #40 - Posted 2011-11-04 01:43:23 »

I think we can all agree that Javascript is a pretty terrible compiler target though.
If you use === instead of == in your language, then most of the quirks (like 0 == '') go away. All of the closure and prototype stuff then allows you to build pretty much anything on top, as it's such a flexible language. So I'd disagree with you.

Sure, it's not bad as a source language, warts like the need for === aside.  But it's still not a very good compiler target, in that it doesn't easily map back to source lines (having not even anything like #line, let alone a debugger format), it lacks typed operations when the source compiler could make use of them, and that it requires some fairly fancy rules in itself to parse and evaluate.

Compiling straight to bytecode might be too low-level, but javascript just isn't intended to be a backend for other languages.
Offline longino

Junior Member


Medals: 1



« Reply #41 - Posted 2011-11-04 04:11:19 »

God forbid if we had to build something onto a language in order to make it usable.

You just confirmed what I have said so far.

JavaScript is unusable, and needs hacks in order to make it look like something better. It is a pain in the ass.
Offline sproingie

JGO Kernel


Medals: 202



« Reply #42 - Posted 2011-11-04 04:36:49 »

longino seems to be confusing the activity on this thread with the silly notion that anyone gives a crap about what he has to say.  Roll Eyes
Offline lhkbob

JGO Knight


Medals: 32



« Reply #43 - Posted 2011-11-04 04:56:49 »

God forbid if we had to build something onto a language in order to make it usable.

You just confirmed what I have said so far.

You just missed my sarcasm.  Taking your reasoning, one could argue that python is better than Java because it supports lists and dictionaries in a more primitive form.  With Java, you have to use the collections API that was built with the language.  I might as well quit programming now because it's absurd that you have to define your own functions and types to get what you want.

I'm stretching a little bit, but it's the same argument you're making.  JavaScript must be terrible because it exposes the tools to support language extensions.  Because of this, they didn't need to explicitly add support, someone else would do it.  If JavaScript had a better runtime library like Java, one could imagine that the class support, or JQuery-like support, would be included for those who wished to use it.  But you could just add a <script/> which is about the same as an import or include, and tada you're good.

And now it's my turn to troll.  You seem to like common lisp, I find it to be the most difficult language to read, it has terrible support for type definitions, and the need for macros clearly shows that it has flaws in its language model.

Offline sproingie

JGO Kernel


Medals: 202



« Reply #44 - Posted 2011-11-04 05:35:00 »

Hey, just because one silly crank likes a language doesn't make it bad.  The use of macros doesn't mean the model is flawed, it means it doesn't presume its model is the only one that can encompass all programs now and forever.  There's a macro to CPS-transform its forms -- how cool is that?  It sucks that macros aren't as first-class as they could be and that they're not hygienic, but I'm not too keen on scheme's complicated approach either.

Offline cylab

JGO Ninja


Medals: 38



« Reply #45 - Posted 2011-11-04 09:50:38 »

It's not that there's anything wrong with French or that it's a crap language

Well, it is - i got the lowest grade in french at school, so I must know Tongue

Mathias - I Know What [you] Did Last Summer!
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #46 - Posted 2011-11-04 12:06:18 »

Calm down, he's just having one of those rants that we all like to have from time to time Smiley

Cas Smiley

Offline Son Of Cain

Junior Member





« Reply #47 - Posted 2011-11-04 12:09:52 »

I second Cas on what he said a few posts earlier - the problem is not JavaScript, it is indeed the fact it is *the* standard for web development these days. But remember that good folks have been releasing us from most of its problems by providing nice libraries, such as jQuery, Prototype, Scriptaculous... which can handle nicely most of what you'd want to do in a web application these days.

Et je n'ai pas aucune problème avec le Français!
Offline ra4king

JGO Kernel


Medals: 341
Projects: 2
Exp: 5 years


I'm the King!


« Reply #48 - Posted 2011-11-04 12:14:01 »

J'adore le Français!

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #49 - Posted 2011-11-04 12:19:02 »

I can't quite think of what strange chain of events must have occurred to force this situation on programmers, really. Since the dawn of computing we've used whatever language fits the problem best and whatever we're most comfortable with, and we've also largely been able to create new languages as an when necessary. Then this happens.

Cas Smiley

Offline Son Of Cain

Junior Member





« Reply #50 - Posted 2011-11-04 12:23:16 »

I think it's one of those situations where the market and the availability for the end user weights in. JS was there in the early browsers, and at that time, "web development" was about writing PHP and handling client side validations and navigation with scripts. It was only later that people begun questioning about keeping state in web applications, and how flawed the request/response with pure hypertext was in other to achieve that.
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #51 - Posted 2011-11-04 12:29:05 »

Thing is even ordinary idiots like me saw this coming years ago. So I wonder why the powers that be didn't settle on some sort of common bytecode engine for scripting and start getting that into all their browsers, allowing people to use any language and compiling down to that? I mean, Java was an obvious candidate, but there have been various others like CLR and LLVM come along in the last decade.

Cas Smiley

Offline Son Of Cain

Junior Member





« Reply #52 - Posted 2011-11-04 12:32:09 »

They couldn't agree, to this day, on a standard format for offline, office documents... so...
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #53 - Posted 2011-11-04 12:53:34 »

They couldn't agree, to this day, on a standard format for offline, office documents... so...

Bad example. It's very difficult to write specs for that stuff and it's also very difficult to verify the correctness of a particular implementation.

Something like a VM is a lot easier. People know how to write specs for this kind of thing and you can describe every detail very precisely. Furthermore, you can easily and accurately verify the correctness of an implementation - you can write tests for everything.

Even Microsoft's JScript thing was pretty accurate and they didn't have any specs for that. They reverse engineered it. I kid you not.

Runtimes and VMs are really a zillion times more straightforward than document formats, HTML parsing (with it's million gotchas), or CSS.

弾幕 ☆ @mahonnaiseblog
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #54 - Posted 2011-11-04 13:07:52 »

Indeed, if JamVM, an absolutely fully compliant Java 6 runtime with JIT, can weigh in 200kb of code then... well. It's not rocket science.

Cas Smiley

Offline JL235

JGO Coder


Medals: 10



« Reply #55 - Posted 2011-11-04 13:12:23 »

Thing is even ordinary idiots like me saw this coming years ago. So I wonder why the powers that be didn't settle on some sort of common bytecode engine for scripting and start getting that into all their browsers, allowing people to use any language and compiling down to that?
That's a lot of work to do right, and you've then got a far more complex ecosystem, which needs far more time to mature.

If netscape had of provided a bytecode engine instead, I think the reality is that Microsoft would have just pushed VBScript more for the web (since it is a client-side language), and everyone would end up using that instead.

Offline Son Of Cain

Junior Member





« Reply #56 - Posted 2011-11-04 14:19:33 »

They couldn't agree, to this day, on a standard format for offline, office documents... so...

Bad example. It's very difficult to write specs for that stuff and it's also very difficult to verify the correctness of a particular implementation.

Something like a VM is a lot easier. People know how to write specs for this kind of thing and you can describe every detail very precisely. Furthermore, you can easily and accurately verify the correctness of an implementation - you can write tests for everything.

Even Microsoft's JScript thing was pretty accurate and they didn't have any specs for that. They reverse engineered it. I kid you not.

Runtimes and VMs are really a zillion times more straightforward than document formats, HTML parsing (with it's million gotchas), or CSS.

Ok, bad example indeed. But the case with JS was not the first time that standards and sanity have been ignored for the sake of quick delivery to market, a (supposed) business model advantage, and ultimately, profit. Yes, designing a spec for a common, standard VM would have been best at the time, but it is easy to understand why it wasn't.
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #57 - Posted 2011-11-04 14:24:05 »

I guess we'll never know unless someone carries the torch.
<looks at feet>

Cas Smiley

Offline Roquen
« Reply #58 - Posted 2011-11-04 15:07:44 »

There are some advantages to a source-level specification and not a bytecode one -- different architectures can compile it in radically different ways, which is harder when you have assumptions about a machine model encoded into lower level code.
This not true for a well designed IR (high or low level).  The low level IR spec of LLVM can hit tons of final targets and is flexible enough to support a huge spectrum of front-end language features.  In my "fantasy" case..a high level, multi-paradigm IR, most people would never want to look at a source code version of it.  Pretty much limited to front-end language designers and extreme masochists.  It would probably need to look like a massively annotated s-expressions (think LISP) or m-expressions.

You're barking up the wrong tree, this is a Java forum. Other than that, Javascript is an excellent language once you grasp the specification. It's a functional language that looks like an object orientated language, which causes a lot of confusion and results in incredibly crappy example code and tutorials all over the interwebs. Please don't let the incompetence of others influence your perspective on this language. The only thing Javascript desperately needs is a rocksolid IDE.
Totally agree.  From a pure expressiveness standpoint, prototype based are significantly more powerful then OO.  They were developed because the strict class hierarchies of OO is a big ugly chain on design.

warts like the need for ===  aside.
Lots of languages have separate comparators for "is equal to" == and "is identical to" ===.  Not supporting both would be officially bad.

I can't quite think of what strange chain of events must have occurred to force this situation on programmers, really. Since the dawn of computing we've used whatever language fits the problem best and whatever we're most comfortable with, and we've also largely been able to create new languages as an when necessary. Then this happens.
So, where does C++ fit into this revisionist version of CS history?  Wink

They couldn't agree, to this day, on a standard format for offline, office documents... so...
That's because:  "Standards are great!  Everyone should have one." always seems to rule the day.

But the case with JS was not the first time that standards and sanity have been ignored for the sake of quick delivery to market, a (supposed) business model advantage, and ultimately, profit.
I don't see any huge flaws in the JS specification.  But to carry with the theme of the comment, this isn't limited to direct/indirect profit motives.  In fact it's better to get out an imperfect product in a timely manner than spending an excessive amount of time/resources attempting to create a perfect one...which is a forever moving forward target.  To turn the microscope on Java:  The bytecode spec is "designed" to be interpreted and makes no nods to the needs of a back-end compiler (ouch).  The original bytecode verification code was a complete snake pit.  At the high level, Java isn't a pure OO language, so to my mind it would be completely obvious that mutable primitive wrapper classes would have been a part of version 0.01 and they were not added until...wait! They still aren't there!  Some very clever folks with experience creating languages worked on all of this, but ultimately time constraints have to weigh in and you can get everything perfect...you're lucky if you can hit pretty good.

Offline loom_weaver

JGO Coder


Medals: 17



« Reply #59 - Posted 2011-11-04 15:59:40 »

I can't quite think of what strange chain of events must have occurred to force this situation on programmers, really. Since the dawn of computing we've used whatever language fits the problem best and whatever we're most comfortable with, and we've also largely been able to create new languages as an when necessary. Then this happens.
So, where does C++ fit into this revisionist version of CS history?  Wink

The whole run everything in a browser travesty was a ZOMG... if everything thing is a webapp then all my problems will be solved!!!

Somewhat similar to ZOMG... if everything is coded to use encapsulation, inheritance, and polymorphism then all my problems will be solved!!!
Pages: 1 [2] 3 4 ... 6
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (15 views)
2014-07-30 21:08:39

Riven (21 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!