|
The single greatest argument in VB.NETcode:
Another gem: code:
|
# ¿ Mar 22, 2008 16:17 |
|
|
# ¿ May 2, 2024 17:15 |
|
Munkeymon posted:I know, but I was specifically thinking of C-style languages where ==[] might look more at home in a conditional. Also, JavaScript and C# already use in for other things. It's actually pretty easy to hack up an extension method on Object for in if you really want it. I think this should work: code:
code:
code:
|
# ¿ Aug 27, 2008 17:26 |
|
At my last job, our entire codebase was littered with CInt(0) or CInt(1) on method calls - you know, just to be extra sure that the compiler doesn't interpret a literal integer as a long or float or something.
|
# ¿ Jul 4, 2009 22:00 |
|
Jesus, you guys with your requirements for programmers should spend a couple weeks working for an internal IT department. I'm fricking thrilled if one of my devs knows what a pointer is. Stuff like language theory is probably important for an architect, but if a dev is told they are going to be using a regular expression, it's nowhere near a necessity. Twos complement as it relates to business programming today is pretty much the least leaky abstraction ever - it's interesting as a sign of intellectual curiosity if someone knows it, but not knowing it would have exactly zero effect on the quality of code they output. enki42 fucked around with this message at 20:33 on Aug 1, 2009 |
# ¿ Aug 1, 2009 20:30 |
|
Reaten posted:Even if this were actually necessary (avoiding 0 as a magic number I guess?) this still can't be the best way to do it. I've worked with apps where specifying a starting seed (I guess this is what they are trying to do here?) was a requirement, but yeah, that's pretty much the worst way you could do it.
|
# ¿ Sep 9, 2009 14:34 |
|
RFC 822 compliance is pointless anyway since there's a sizeable amount of e-mail servers that can't deal with perfect compliance anyways. Being technically correct in this case leads to more problems than it solves. The best check of e-mail correctness (beyond checking if it looks vaguely like an e-mail address) is to see if it bounces the first time you actually have to send an e-mail to that person.
|
# ¿ Oct 7, 2009 15:38 |
|
It's just about the worst named function I've ever seen. What it's supposed to do depends heavily on someRegExp which I'm assuming is a constant. If it was something that checked whether something is a number I suppose it could be something to test whether a string can be parsed to a number, although who the hell knows why you'd return NaN if it doesn't.
|
# ¿ Feb 21, 2022 14:19 |
|
|
# ¿ May 2, 2024 17:15 |
|
I don't know how you write the signature for that return value in Typescript and not realize that you're doing something very, very wrong.
|
# ¿ Feb 21, 2022 14:25 |