News for hackers. Stuff that matters.
Re:W3.css – A minimal alternative to Bootstrap by MatthiasPortzel on Tuesday September 13, 2022 @09:25PM (#32832227)
I just pulled up the page for String.match, which is a weird function because it returns an array that has named properties on it. W3Schools doesn't mention that. It just says it "method returns an array with the matches." It also doesn't mention the behavior without the global flag. I also noticed a misspelling ("Differense").

=> https://www.w3schools.com/jsref/jsref_match.asp

=> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Comparing these two pages, only the second one is competent at describing what the function actually does. Neither is perfect. The MDN doesn't do a great job of communicating all the information, but at least all of the information is there.

Re:W3.css – A minimal alternative to Bootstrap by djbusby on Tuesday September 13, 2022 @10:28PM (#32832620)
Can't we also issue PR against MDN?
Re:W3.css – A minimal alternative to Bootstrap by latchkey on Tuesday September 13, 2022 @11:11PM (#32832894)
Yes and they are very responsive about getting it merged in.
Re:W3.css – A minimal alternative to Bootstrap by golergka on Wednesday September 14, 2022 @08:23AM (#32836138)
What?!

I think I've been using MDN for 20 years (I don't remember honestly when it first came to be), but it's first time I hear about it. Banner/link blindness is a hell of a thing! Thanks for letting me know.

Re:W3.css – A minimal alternative to Bootstrap by nextaccountic on Thursday September 15, 2022 @04:38AM (#32848970)
Mozilla fired basically the entire MDN team with the rationaly that the "community" will pick up the slack with PRs and such

https://news.ycombinator.com/item?id=24132494

This was in 2020, I don't know if they eventually hired _someone_ to work on MDN

Re:W3.css – A minimal alternative to Bootstrap by latchkey on Wednesday September 14, 2022 @10:07AM (#32837395)
At the very bottom of the page is:

"Found a problem with this page?"

With a section on how to edit it.

Re:W3.css – A minimal alternative to Bootstrap by golergka on Wednesday September 14, 2022 @10:19AM (#32837606)
Yes, and that's exactly what years of using MSDN and other similar documentation sites have taught me to be blind too.
Re:W3.css – A minimal alternative to Bootstrap by marwis on Wednesday September 14, 2022 @03:23PM (#32842025)
For quite a while now MSDN has edit button that takes you to the source of the page on GitHub :)
Re:W3.css – A minimal alternative to Bootstrap by Waterluvian on Tuesday September 13, 2022 @09:59PM (#32832420)
Tangent: why is .match on Symbol? I read through string.match and looked at Symbol and I don’t understand why all these helpful functions exist on Symbol.
Re:W3.css – A minimal alternative to Bootstrap by jchw on Tuesday September 13, 2022 @10:05PM (#32832464)
Symbol.match is not the match function, it is a Symbol which can be used as a property key on an object that is supposed to behave like a regular expression.

The purpose of having Symbol values is to ensure the property keys are unique and can't collide with string keys that predate new standards.

Re:W3.css – A minimal alternative to Bootstrap by acdibble on Wednesday September 14, 2022 @05:42AM (#32834998)
Re:W3.css – A minimal alternative to Bootstrap by Waterluvian on Thursday September 15, 2022 @08:34AM (#32850828)
Ohhhh okay. So it’s just a flag describing expectations about an object. And as a Symbol it doesn’t interfere with any other part of the object such as properties or iteration.