Camen Design Forum

Why isn't JavaScript like BASIC?

Kroc

I would need to do a lot of research first about BASIC and what makes JavaScript (and modern development environments) unfriendly.

I do believe that for immediacy of results, there is no better programming language than BASIC. On a BBC it takes two lines of text to draw a circle. Want to do that in Java? JavaScript? C? The pain is not only how many LOC it takes, the real burden is the amount of background knowledge that is needed just to piece together the blank canvas before you start.

Some of the things that a child shouldn't have to know up front to produce results are OOP, functions and scoping. Anybody have the faintest idea how to play a tune of notes in JavaScript using the new HTML5 sound API? Nope. It's about as intuitive and obvious as a tax form. Therefore there should be a global BASIC-like function something along the lines of `synth (["c#", "d", "e", "f#"]);`.

My aims would be to boil down enough complex functionality into a set of straightforward functions that a child can bash out a game in a couple of hundred lines without the need to build their own framework first :|

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn