Hacker News new | ask | show | jobs
by guelo 3510 days ago
How do you know how to loop over an array for (int i=0;... ? You didn't invent that code. You read it somewhere many years ago and have copied it over and over many times since then. Do you have a license for that code? The author you learned it from did not invent it either, was he violating a license? It wasn't even invented by Dennis Ritchie since he copied the idea from earlier languages.

My point is that trying to copyright basic snippets of code is just ridiculous, it's something lawyers have tried to force on programmers but it makes no sense. We would be completely unable to program at all if we listened to lawyers all the time.

1 comments

Well, actually I just typed [] in my browser's console, expanded it, then expanded the prototype and found a method called "forEach" which sounded like what I wanted. Fiddled with it a bit until it worked.

Clean room usage~