r/programmingcirclejerk • Software Craftsman • Dec 30 '17

Retiring Python as a Teaching Language because Javascript

http://prog21.dadgum.com/203.html
39 Upvotes

46 comments sorted by

View all comments

41

u/Earhacker Code Artisan Dec 30 '17

Python has too many libraries. Let's teach JavaScript instead!

19

u/[deleted] Dec 30 '17 edited Dec 31 '17

lol I wonder how many fewer "libraries" JS would have if there was some kind of minimum length they needed to be in order to get accepted by the package repository, instead of the situation that apparently exists now where there's no distinction at all between large multi-file frameworks and things that are really just a couple of functions, or not even a couple.

24

u/Earhacker Code Artisan Dec 30 '17
const unjerk = require("unjerk");

That makes sense in JavaScript, though. I don't want my users to have to download the entire Lodash library just so I can shuffle an array painlessly. I should only have to require the minimum code necessary for that functionality.

In Python, who cares how big a library is? My users are probably only going to download and install my app once, and not every time they open it. I can import basically whatever I like.

11

u/[deleted] Dec 31 '17

JS needs a significantly more fleshed-out standard lib.

3

u/Earhacker Code Artisan Dec 31 '17

Most devs who use Lodash would describe it as JavaScript's missing standard library.

Python doesn't have a list.shuffle method right out of the box either, btw. You'd have to:

from random import shuffle

Neither does Java:

import static java.util.Collections.shuffle;

Only language I personally know of with a built-in, always available method for this is Ruby's Array#shuffle. And thank fuck not every language has a stdlib like Ruby.

12

u/tehtris Dec 31 '17

Random comes with python though... so if a uaer has python they have random.