News for hackers. Stuff that matters.
Re:The case against Kotlin by zem on Saturday July 29, 2017 @03:53PM (#14882754)
you can thank that one guy who wrote a 10000 line php function to validate email addresses.
Re:The case against Kotlin by sethrin on Saturday July 29, 2017 @07:08PM (#14883442)
10000 lines might not be enough. I'm not sure that it's possible to determine whether something is a valid email address other than trying to send mail to it. If you haven't read the RFCs, they're pretty much a nightmare. The HTML5 spec has this little gem:

> This requirement is a willful violation of RFC 5322, which defines a syntax for e-mail addresses that is simultaneously too strict (before the "@" character), too vague (after the "@" character), and too lax (allowing comments, whitespace characters, and quoted strings in manners unfamiliar to most users) to be of practical use here.[0]

[0] https://www.w3.org/TR/html5/forms.html#e-mail-state-(type=em...

Re:The case against Kotlin by sethrin on Sunday July 30, 2017 @08:11AM (#14885610)
As an aside, if anyone has ever actually used comments, whitespace, or quoted strings in an email address, that would be be extremely interesting to hear about.