Coding with Python in CoSpaces

In France a reform of the high school will take place next September. The coding language for the new curiculum is Python. What about other countries for high school? Unfortunately CoSpaces only offers CoBlocks and JavaScript. Will other CoSpaces users be interested in coding with Python?

1 Like

The same here! Great if we can use Python!

Python is great for server-side apps or hardware, but makes no sense for web browser apps - Javascript is the language for programming client-side web apps, just as HTML is the language for coding the structure of a web page.

Geoff @ TechLeap

Cospaces is an application for learning coding. If a student can’t program in Python in CoSpaces, then CoSpaces is no longer really suitable for use in high school in France. Too bad!
Daniel PERS, STEM teacher in France

It would be a very strange to have a national curriculum that dictates the programming languages that a high school must use. It would also be very strange for students to learn only one programming language.

I learnt HTML, CSS, JavaScript, Perl, PHP, ASP, SQL, Java, C++ and Python during my career in web development. Once you know one language, it’s pretty easy to pick up another.

CoSpaces is an web browser application for learning 3D development, including manipulating 3D objects in the browser, which uses Javascript, because that’s what CoSpaces is built with. That’s how CoSpaces runs in the browser - it uses JavaScript.

It’s important for students to use languages which are fit for purpose. You would not use Python to create a web app, in the same way you wouldn’t use JavaScript to program an Arduino.

I understand you’d like to see Python added as an option - you use it already in your curriculum; I’m explaining why it may not be added.

Geoff @ TechLeap

I’m afraid that you have an impression that CoSpaces is written in JavaScript or TypeScript. That’s wrong, it’s not written either in JavaScript or TypeScript or other language for the web. It’s compiled to JavaScript to run in the browser. And it’s compiled to native code for mobile platforms and Windows.

Thanks for jumping in to the discussion, @konsoletyper - what I meant is that it CoSpaces compiles down to Javascript to run on the web. While you’re here, I’d love to get your thoughts on 2 things:

  1. For projects which use Javascript/Typescript, is this code run without any further minification or obfuscation?
  2. What are your thoughts on the technical difficulty of implementing using Python as a coding language option in CoSpaces?

Many thanks,
Geoff @ TechLeap

TypeScript is not supported by the browser, so in order to run TypeScript we compile it right in the browser (fortunately, TypeScript itself written in TypeScript and thus runs in the browser). BTW, this is the reason why coding is only available in the web client.

There are Python to JavaScript compilers, so yes it’s possible. The problem here is with editor. We use Monaco which has built-in support for TypeScript. Supporting Python is possible, but it requires some additional work. Without it we’ll only have basic text editor without autocompletion and navigation, which we have for TypeScript.

1 Like