News for hackers. Stuff that matters.
Re:W3schools.dev Redirects to Mozilla Developer Network by onli on Friday March 01, 2019 @10:10AM (#19281283)
I'd be angry at python there. It's python that uses lists like arrays in the standard language, making beginners search for arrays when python would use a list.

That's a pattern of the language and why I don't like it: It's very often almost like the other C-like languages, only to be that much different that it gets confusing. To just ignore that and call a list an array is not correct, but it makes the beginner searching how to do array-like stuff in python succeed in his task.

I'd be more annoyed at that page if they didn't explain the situation, but they do.

Re:W3schools.dev Redirects to Mozilla Developer Network by umanwizard on Friday March 01, 2019 @10:20AM (#19281370)
> I'd be more annoyed at that page if they didn't explain the situation, but they do.

Actually, they don't. The article claims that arrays don't exist, but you can use lists instead.

Apparently the polar opposite is true: lists don't exist, but you can use arrays instead! (And they're called "lists" for whatever reason).

Re:W3schools.dev Redirects to Mozilla Developer Network by onli on Friday March 01, 2019 @10:58AM (#19281801)
Python has something it calls lists. Those lists are basically like what other languages would call arrays.

But python also has an array module you can use after an import, it's not loaded by default. That data structure behaves even more like the thing C calls an array.

I don't see why a python list is not a list per se. Don't be confused by the others explaining it is not a linked list - something does not have to be a linked list to be a list. It's still a numbered collection of stuff that can be sorted, thus a list.

Though it is true that as a programmer you probably are first confronted with a data structure called list when you learn a LISP, and that data structure will be a linked list.

Confronting beginners with all this is not useful for them, w3schools just adding a note and calling the python default collection thing an array is thus not that unreasonable. Though I'd prefer it if they just called it a list in the explanation below the note, after explaining that this list structure is what you are probably searching, with a link "look there for what python calls an array". So in that way I agree with you, this is not optimal.

Re:W3schools.dev Redirects to Mozilla Developer Network by Scarblac on Friday March 01, 2019 @10:29AM (#19281466)
This is silly. Both "list" and "array" are so broadly defined that they largely overlap.
Re:W3schools.dev Redirects to Mozilla Developer Network by umanwizard on Friday March 01, 2019 @10:34AM (#19281517)
Then why doesn’t the article point out what definitions it’s using, rather than claiming arrays don’t exist and then talking about arrays?