Discuss Scratch

AHypnoman
Scratcher
1000+ posts

js or python

ElvenAnimator wrote:

Python, it has everything from scratchattach to circuits to websites to pen to file management to uhh you get the point
JS has similar tools to Scratchattach. JS is designed for websites, JS can connect to canvas through HTML (I presume by ‘pen’ you mean turtle?), and most JS runtimes have file management.

Also could you specify what ‘circuits’ are?
TheCreatorOfUnTV
Scratcher
1000+ posts

js or python

Python has documentation, while I'm pretty sure JavaScript doesn't (so basically you have to look up everything to know what to do at all)
mybearworld
Scratcher
1000+ posts

js or python

TheCreatorOfUnTV wrote:

(#605)
Python has documentation, while I'm pretty sure JavaScript doesn't (so basically you have to look up everything to know what to do at all)
Do you mean documentation comments? JavaScript does have those, but they're not integrated into the language. Most IDEs will show them, though.

/**
 * Divides to numbers together.
 * @param {number} num1 The dividend.
 * @param {number} num2 The divisor.
 * @returns {number} The resulting quotient.
 */
const div = (num1, num2) => {
  return num1 / num2;
};
josueart
Scratcher
500+ posts

js or python

TheCreatorOfUnTV wrote:

Python has documentation, while I'm pretty sure JavaScript doesn't (so basically you have to look up everything to know what to do at all)
Mozilla Developer Network docs:
AHypnoman
Scratcher
1000+ posts

js or python

TheCreatorOfUnTV wrote:

Python has documentation, while I'm pretty sure JavaScript doesn't (so basically you have to look up everything to know what to do at all)
JS has extensive documentation on MDN and further documentation for node on nodejs.org. Also you have to search for things in the docs too.
TheCreatorOfUnTV
Scratcher
1000+ posts

js or python

mybearworld wrote:

TheCreatorOfUnTV wrote:

(#605)
Python has documentation, while I'm pretty sure JavaScript doesn't (so basically you have to look up everything to know what to do at all)
Do you mean documentation comments? JavaScript does have those, but they're not integrated into the language. Most IDEs will show them, though.

/**
 * Divides to numbers together.
 * @param {number} num1 The dividend.
 * @param {number} num2 The divisor.
 * @returns {number} The resulting quotient.
 */
const div = (num1, num2) => {
  return num1 / num2;
};
No, I meant JavaScript itself being documented.
mybearworld
Scratcher
1000+ posts

js or python

TheCreatorOfUnTV wrote:

(#610)
No, I meant JavaScript itself being documented.
There's the official JS spec, but also https://developer.mozilla.org/en-US/ which is more than enough for most people
Zachary13265
Scratcher
55 posts

js or python

mybearworld wrote:

TheCreatorOfUnTV wrote:

(#610)
No, I meant JavaScript itself being documented.
There's the official JS spec, but also https://developer.mozilla.org/en-US/ which is more than enough for most people
Nice
dynamicsofscratch
Scratcher
1000+ posts

js or python

js because why not.

btw heres a quote from jeff atwood

Jeff Atwood, author of Atwood's Law wrote:

Everything that can be written in Javascript, will eventually be written in Javascript.
BigNate469
Scratcher
1000+ posts

js or python

I wonder if Python would be better if it was compiled, rather than interpreted (because simple syntax+speed seems like a good combo)

Of course, JS has relatively simple syntax, and most browsers run it quite quickly, and then there's AssemblyScript just in case you wanted to run it faster and don't mind it being typed.

Last edited by BigNate469 (Aug. 24, 2024 16:18:32)

AHypnoman
Scratcher
1000+ posts

js or python

BigNate469 wrote:

I wonder if Python would be better if it was compiled, rather than interpreted (because simple syntax+speed seems like a good combo)

Of course, JS has relatively simple syntax, and most browsers run it quite quickly, and then there's AssemblyScript just in case you wanted to run it faster and don't mind it being typed.
Aside from braces, indentation, and brackets, syntax is nearly the same. I prefer the way JS handles scoping and statements, but they're as simple as one another past that.

I think JS being untyped is a disadvantage (I don't like the way TS handles it, although that's personal preference.)
gilbert_given_189
Scratcher
1000+ posts

js or python

BigNate469 wrote:

I wonder if Python would be better if it was compiled, rather than interpreted (because simple syntax+speed seems like a good combo)
Try PyPy, an (almost) drop-in Python implementation with a JIT compiler. I've used it on a project once that's very calculation heavy, and the speed of that is comparable to the Rust implementation I made from trying to gain performance.

The only thing you might encounter from using PyPy is some libraries that can't be imported.

Last edited by gilbert_given_189 (Aug. 25, 2024 11:51:34)

Zachary13265
Scratcher
55 posts

js or python

AHypnoman wrote:

BigNate469 wrote:

I wonder if Python would be better if it was compiled, rather than interpreted (because simple syntax+speed seems like a good combo)

Of course, JS has relatively simple syntax, and most browsers run it quite quickly, and then there's AssemblyScript just in case you wanted to run it faster and don't mind it being typed.
Aside from braces, indentation, and brackets, syntax is nearly the same. I prefer the way JS handles scoping and statements, but they're as simple as one another past that.

I think JS being untyped is a disadvantage (I don't like the way TS handles it, although that's personal preference.)
TTS DOES THAT!!
AHypnoman
Scratcher
1000+ posts

js or python

Zachary13265 wrote:

~Snip~
TTS DOES THAT!!
…what's tts and what does it do?

Powered by DjangoBB