I agree with Cas: Javascript is shit. I earn a living writing Javascript and I loathe it. It is definitely the best tool for writing web apps, but that's damning with faint praise. It's nightmarish to maintain, it has the performance of an drunk encephalitic tapeworm and about as much charisma. If you write little toys with it, it's fine but it scales badly. You try having a giant code base and then something breaks and you get no warnings whatsoever and when you do get an error it's nowhere near the actual problem. A nightmare.

So if you want to be "future proof", C is obviously not the way to go, but mastering Javascript is.

wrt js java is like learnin good english a primitive lang as it is nd than switchn 2 a much more efficient mode of communication its not hard 2 do at all nd ne1 w/o a good grammar nd skilled in prose can craft a compltly legit eng w/ there i's closed nd nvr rly need 2 go 2 hischool they drill n whos and whoms and it does no one no good it is compltly rediculous to lrn J. or C or C++ or C# their obsolete nd no1 will use them in the future clearly no1 needs that skill so y waste ur time learning nething but js not even a fool would put time n2 learnin a soon 2 b obsolete language js is the only way of the future nd no 1 will benefit 4 learning it 1st i feel srry 4 the people that lrn n outdated lang obv they will not b able 2 transition 2 the new standard nd those of us who have lrnd js from the start will laugh nd laugh cause no 1 will be able 2 lrn what we did as quickly as we did its not like knowng j will make js code a trivial ndvor knowin js will make knowin C and J easy nd no1 will need 2 use nething but js cause computers will b faster

While I loathe Javascript, I like Gmail well enough. The real value for me is that Google spam filtering is the best I've ever seen

Well the spam filtering works of course without using the web interface, and yes its quite good. I like gmail, just not the web shit.I also had to figure out which "design" is actually the one you would expect from a email app, otherwise gmail be default, groups messages somehow, and I just find it extremely hideous.If I get 6 messages from Riven saying "you're a poopy-head", then I want to see 6 list entries and not have them grouped as a "conversation". Maybe you like that, I like things to behave traditionally...And yeah drag and drop never works in web apps... well maybe sometimes it works, but its rare. Also right mouse button support is rare. The few times I use the dropbox web app I'm always surprised that it works.

Well, javascript really isn't just for browsers. I think javascript is really quite nice. A quite nice scripting language. I'd never want to use it for general purpose programming. It's attempting to move in that direction, but it's going to have the classic problem of inertia. 2020 is the last guess I'd heard for threading. It needs tons of changes to become a useful general purpose language.

In other words... it needs to be a different language.

Pretty much, yeah. I don't see how javascript can evolve into a general-purpose language that isn't awful. Too many design decisions which target scripting, which are good calls in that space are horrid in a general language space. (NOTE: I have not been paying attention to javascript evolution)

Well, javascript really isn't just for browsers. I think javascript is really quite nice. A quite nice scripting language. I'd never want to use it for general purpose programming. It's attempting to move in that direction, but it's going to have the classic problem of inertia. 2020 is the last guess I'd heard for threading. It needs tons of changes to become a useful general purpose language.

In other words... it needs to be a different language.

Pretty much, yeah. I don't see how javascript can evolve into a general-purpose language that isn't awful. Too many design decisions which target scripting, which are good calls in that space are horrid in a general language space. (NOTE: I have not been paying attention to javascript evolution)

You don't have to, there isn't so much evolution to speak of in the scripting language itself, only in the piles and piles of script code browsers now have to execute just to do stuff you'd do with a couple of lines in any "normal" programming language. In fact its the browsers that have evolved to cope with Javascript I'd say. And continue to evolve as regularly whole new javascript engines have to be built just to meet demands. The ones existing today must use quantum mechanics or something.

JavaScript is okay. If you use a text editor with JSLint integration, that is.

However, the function scoping and the behavior of "this" is just bat-shit insane. There are also no proper namespaces, modules, or something like that. You can import stuff in CSS. You can't do that in JS. There are hundreds of ways to roll your own classes an inheritance. As a result, your tools won't have a clue that those weird looking constructs are supposed to be classes.

Well, it certainly has massive scaling issues. Your tools can't help you. It's all smurfs and foobars. For example:

var x = Math.round(5).length;

We can be fairly certain that this "Math" thing is the one provided by many environments. We can also guess that "round" is the usual rounding function which returns a Number. But... does a Number instance have a "length" property? Well, no idea. Someone could have added it to that... thing. I can't know. To be honest, we also don't know if "Math" and "round" are those things we think they are.

Dart, my current favorite language, doesn't have any of those issues. Just like in Java, there are proper namespaces and stuff. You know what all of those things are. If you use a function from the Math package, it's that function from the Math package. Real lexical scoping, a sane "this", built-in classes/inheritance, etc. Unlike JS, it was created with tooling and performance in mind. And, well, it works. The editor is already way smarter than any JS IDE ever could be, startup is already 10 times faster, and the Dart VM is also already about 25% faster than V8 (Chrome's JS engine). Their goal is to make it at least twice as fast as V8. They will easily reach that goal, no doubt.

Someone explain to me why there isn't a browser other than the laughable Hotjava one which used Java as its clientside scripting language.

Cas

Because Java doesn't "integrate with PHP" the same way Javascript and PHP do. There's another very practical reason why Java or a language like it can't be used for web page scripting. It's too verbose. Did you know Java code is 1% longer for the equivalent Javascript program for trivial, non-real-world programs that can actually be implemented efficiently with Javascript? Network bandwidth is very important for HTTP servers. Just ask the "standard" makers. Google had to get the header "X-Do-Not-Track" shortened to "DNT" so they could still afford their 2000 character tracking cookie. Visit any website and you'll be shocked at how streamlined professionals make their web pages in order to make them load fast and preserve the user's bandwidth. No one's loading masses of libraries they don't really need. Oh, and Javascript is faster, doesn't use garbage collection, doesn't freeze your web browser, and doesn't...

(Ninja'd. I'm still making a joke at the expense of PHP and Javascript programmers. Sorry Cero.)

Someone explain to me why there isn't a browser other than the laughable Hotjava one which used Java as its clientside scripting language.

Cas :)

Because Java doesn't "integrate with PHP" the same way Javascript and PHP do. :persecutioncomplex: There's another very practical reason why Java or a language like it can't be used for web page scripting. It's too verbose. Did you know Java code is 1% longer for the equivalent Javascript program for trivial, non-real-world programs that can actually be implemented efficiently with Javascript? Network bandwidth is very important for HTTP servers. Just ask the "standard" makers. Google had to get the header "X-Do-Not-Track" shortened to "DNT" so they could still afford their 2000 character tracking cookie. Visit any website and you'll be shocked at how streamlined professionals make their web pages in order to make them load fast and preserve the user's bandwidth. No one's loading masses of libraries they don't really need. Oh, and Javascript is faster, doesn't use garbage collection, doesn't freeze your web browser, and doesn't...

(Ninja'd. I'm still making a joke at the expense of PHP and Javascript programmers. Sorry Cero.)

Well I mean, of course javascript and PHP are shorter, less verbose than Java, because in those languages you can just allocate random shit to other random shit and it works (or not and it doesnt tell you :D), that freedom comes of course with a horrible cost... Like many people said, not a big deal not smaller scripts but definitely for larger codebasesI myself have not worked on a larger js or php codebase... I would actually be interested what kinda tricks you guys use to find errors.

I would actually be interested what kinda tricks you guys use to find errors.

Haha, I can't believe you don't know how errors are easily found in web deployments Oh all right I'll tell you. You upload it to the webserver, and then floods of angry emails come in from the 100,000 users you shafted without warning when it doesn't work, and then you panic fix it. Rinse, repeat.

I would actually be interested what kinda tricks you guys use to find errors.

Haha, I can't believe you don't know how errors are easily found in web deployments Oh all right I'll tell you. You upload it to the webserver, and then floods of angry emails come in from the 100,000 users you shafted without warning when it doesn't work, and then you panic fix it. Rinse, repeat.

Well I mean, of course javascript and PHP are shorter, less verbose than Java, because in those languages you can just allocate random shit to other random shit and it works (or not and it doesnt tell you ), that freedom comes of course with a horrible cost... Like many people said, not a big deal not smaller scripts but definitely for larger codebasesI myself have not worked on a larger js or php codebase... I would actually be interested what kinda tricks you guys use to find errors.

My previous comment was 50% sarcasm by weight and 90% sarcasm by volume. Javascript and PHP are not shorter at all unless you're playing with the results of someone else's program. You might save a few keystrokes on variable assignments, but you're going to use way more characters and coding time for original work or for anything serious. PHP and Javascript grow exponentially more time consuming for any serious project.

PS: My favorite method for finding bugs in JS and PHP projects is to open the source code in a text editor, open the "Go to line" dialog, and enter a random number on the number keypad.

So if you want to be "future proof", C is obviously not the way to go, but mastering Javascript is.

wrt js java is like learnin good english a primitive lang as it is nd than switchn 2 a much more efficient mode of communication its not hard 2 do at all nd ne1 w/o a good grammar nd skilled in prose can craft a compltly legit eng w/ there i's closed nd nvr rly need 2 go 2 hischool they drill n whos and whoms and it does no one no good it is compltly rediculous to lrn J. or C or C++ or C# their obsolete nd no1 will use them in the future clearly no1 needs that skill so y waste ur time learning nething but js not even a fool would put time n2 learnin a soon 2 b obsolete language js is the only way of the future nd no 1 will benefit 4 learning it 1st i feel srry 4 the people that lrn n outdated lang obv they will not b able 2 transition 2 the new standard nd those of us who have lrnd js from the start will laugh nd laugh cause no 1 will be able 2 lrn what we did as quickly as we did its not like knowng j will make js code a trivial ndvor knowin js will make knowin C and J easy nd no1 will need 2 use nething but js cause computers will b faster

Good luck parsing that in less time than I wrote it.

As a teenager, this was pretty easy for me to read. However, I had a massive headache after XD

Java, not Javascript, is my favorite language, has been since it's inception, will be till the day I die, probably.

On a side note, Python is heading toward more standard syntax, print will now need parenthesis and such. It's great for serverside stuff, but for a full program it lacks luster to it, and it's fugly. Just sayin!

> I would actually be interested what kinda tricks you guys use to find errors [in JS].

I use JSLint (as a plugin). It's a static code analysis tool. It restricts you to a somewhat less insane subset of JavaScript (see: JavaScript: The Good Parts) and it will tell you if you did something obviously stupid. Unlike other static code analysis tools, it's 100% accurate. Well, it kinda cheats. It only includes accurate tests and most of its test are actually about conventions. The theory is that adhering to conventions, which improve the quality of the code by dodging or sidestepping common issues, can improve the quality equally well as targeting bugs directly.

From my own experience I'd say that, yes, this strategy really does work. I actually use the same strategy for CSS architecture. I use simple rules which can be verified by machines. Sticking to those rules automatically yields good results, because doing things in stupid ways would be a lot more work. Fortunately, people are lazy. I exploit this law of nature.

Self-correcting processes are the way to go. I also believe that we should use machines as much as we can. That's why we invented them, to do the same stupid brainless crap a million times a day.

Another thing you can try is TDD (via Jasmine or Mocha). I only used it for libraries so far, but I think it can be really worthwhile... well, with libraries at least. TDD is just plain perfect for this.

> larger js [...] codebase

Well, just look at Google. They made the Closure Compiler (which uses type annotations), they made GWT, and they also made Dart. They apparently think that writing bigger programs in JavaScript isn't feasible. They should know. They wrote some of the larges and most popular JavaScript applications (maps, gmail, spreadsheets, ...).

Even though my own experience is somewhat limited, I have to agree. With JS, everything is just hot-glued together. Literally. You have to concat your scripts and then run them through a minifier (congratulations, you now need a build script). You also need a way to avoid this during development, because you need to be able to debug things. Your IDE can't help you much either, because it just can't know what those things or constructs are. Structure which was added by conventions isn't accessible to tools.

It's okay up to 5 kloc or so. It's less annoying if you're working alone on the code. If it weren't for the retarded scoping, I'd say that it's pretty much perfect for small games.

Sure there is... There are better more elegant languages that let you think and express your program's logic at a higher level. I used to be a C++ guru, btw.

There is HUGE buzz behind Scala and legitimate reason for it. Companies like twitter and tumblr did major migrations to Scala for very good reasons.

This attitude of "I will cling to whatever legacy tool has maintained popularity" is lame. I understand newbies, need somewhere to start. But if you are an independent hobbyist, you should be attempting to blaze new trails not cling to the legacy ways of the past.

I missed this. You're taking my comment out of context. There's zero reason for big game studios to change from C++. The tech reasons have been covered ad naseum in many threads so there's no reason to repeat them. So instead I'll do two hypothesis:

1) The big players in the multi-billion dollar game industry have only succeeded in hiring idiots that don't know anything about modern compiler & language design.2) Maybe they do have a clue.

P.S. Never tell people you're a "guru" at anything...you're just shooting yourself in the foot. The first thing I think of is "Hey, I have this 19.99USD mail-in certification!"

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