News for hackers. Stuff that matters.
Re:VanillaJS Framework Announced by taypo on Tuesday January 06, 2015 @08:12AM (#8844159)
How is this a fair comparison:

Vanilla JS var s = document.getElementById('thing').style; s.opacity = 1; (function fade(){(s.opacity-=.1)<0?s.display="none":setTimeout(fade,40)})();

jQuery <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $('#thing').fadeOut(); </script>

Re:VanillaJS Framework Announced by josefdlange on Monday January 05, 2015 @08:08PM (#8842362)
It took me about five minutes to realize how dumb I was and that this was literally Vanilla JS.
Re:VanillaJS Framework Announced by iamlolz on Monday January 05, 2015 @08:11PM (#8842373)
Yep, it had me scratching my head.
Re:VanillaJS Framework Announced by smt88 on Monday January 05, 2015 @07:34PM (#8842245)
I love this so much. I'd give it a million upvotes if I could.
Re:VanillaJS Framework Announced by icedchai on Monday January 05, 2015 @10:52PM (#8842838)
You love extra typing for no reason? I see the point but jQuery is still much more concise.
Re:VanillaJS Framework Announced by smt88 on Tuesday January 06, 2015 @02:28PM (#8846402)
Typing is pretty minimal when you use a good IDE with autocomplete. I never type the word "document" -- just "d" and then enter. (Note that vanilla JS has great autocomplete support out-of-the-box in many IDEs.)

The vast majority of development time is spent dealing with people, reading code, learning, or maintaining code. Typing is a very small part of it, and I remember seeing a study recently that confirmed it.

If you hate typing that much, just write simple wrappers around vanilla JS, e.g. $.el = function (id) { return document.getElementById(id) };

What's more, when you're writing a complex web app using JS libraries, all of those milliseconds you lose in performance are going to add up (especially on mobile!)

Re:VanillaJS Framework Announced by icedchai on Tuesday January 06, 2015 @03:04PM (#8846581)
Those "simple wrappers" are already provided to me by using jquery, etc. Why would I waste my time writing my own? (I realize a lot more is also provided.)

The getElementById is really the most simplistic example and actually does not bother me. Though just look at all the cruft required to make a AJAX call with "vanilla" JS. It's gross. Use a well known, standard library and abstract it all away.

Re:VanillaJS Framework Announced by welly on Monday January 05, 2015 @08:20PM (#8842407)
You should write a script to create a million users and for them to automatically upvote this post.
Re:VanillaJS Framework Announced by zackify on Tuesday January 06, 2015 @02:15AM (#8843250)
agreed
Re:VanillaJS Framework Announced by robinricard on Tuesday January 06, 2015 @07:17AM (#8843990)