Re:Jolie, the service-oriented programming language
by smrtinsert on Wednesday May 08, 2024 @01:18AM
(#40294595)
It's all devs in general. As a java dev I have lost count of the number of times I have to tell any dev not to use a damn regex to validate emails.
Re:Jolie, the service-oriented programming language
by soco on Wednesday May 08, 2024 @07:36AM
(#40296808)
But why do you even need to validate that email? Send the subscriber a confirmation link - if they get it then it was valid, if not then it's on them to fix the situation in whatever way they find fit.
Re:Jolie, the service-oriented programming language
by UniverseHacker on Wednesday May 08, 2024 @01:05PM
(#40300415)
A single massive and unreadable regex isn't an appropriate way to validate a spec that complex. With its complexity it can't be logically evaluated- only tested, whereas a function that breaks the spec out into steps/parts is going to be a lot more maintainable, readable, and auditable.
I really wish people wouldn't code their own checks rather than use already existing standards. Some languages like Java even include proper checks in their standard library: https://java.net/projects/javamail
Several jobs back I had no end of arguments with some Java devs about not writing their own checks, that kept routinely failing on legitimate addresses.