Facebook killed the radio star. And by radio star, I mean the premise of distributed forums around the internet. And that got got by Instagram/SnapChat. And that got got by TikTok. Where the fuck is the internet we once knew?
0 Members and 1 Guest are viewing this topic.
I have a programming folder, and I have nothing of value there
Our species really annoys me.
Apparently it also has eq, ne, lt, gt, le, ge, and. Evidently, symbolic operators (==, !=, <, >, <=, >=, &&, and ||) are used for numbers, whereas their textual counterparts are for strings.
Apparently it also has eq, ne, lt, gt, le, ge, and. Evidently, symbolic operators (==, !=, <, >, <=, >=, &&, and ||) are used for numbers, whereas their textual counterparts are for strings.You think that's odd? How about JavaScript - did you know that JavaScript invented the !! operator? (Not part of the language spec but it has its uses). It also has the === and !== to prevent type coercion when determining equality....
Quote from: MyndFyre on August 28, 2011, 04:52:07 pmApparently it also has eq, ne, lt, gt, le, ge, and. Evidently, symbolic operators (==, !=, <, >, <=, >=, &&, and ||) are used for numbers, whereas their textual counterparts are for strings.You think that's odd? How about JavaScript - did you know that JavaScript invented the !! operator? (Not part of the language spec but it has its uses). It also has the === and !== to prevent type coercion when determining equality....php also has === and !==. They're actually really useful. I've never seen !!, but I'm guessing it converts a value to either 'true' or 'false' by negating it twice? If so, assembly's been doing that forever.
Quote from: iago on August 28, 2011, 06:20:05 pmQuote from: MyndFyre on August 28, 2011, 04:52:07 pmApparently it also has eq, ne, lt, gt, le, ge, and. Evidently, symbolic operators (==, !=, <, >, <=, >=, &&, and ||) are used for numbers, whereas their textual counterparts are for strings.You think that's odd? How about JavaScript - did you know that JavaScript invented the !! operator? (Not part of the language spec but it has its uses). It also has the === and !== to prevent type coercion when determining equality....php also has === and !==. They're actually really useful. I've never seen !!, but I'm guessing it converts a value to either 'true' or 'false' by negating it twice? If so, assembly's been doing that forever. Vouching !== and === usefulness; if a function returns 0 as a valid, that's not false! They're also fractionaly faster than their typeless alternative comparisons.
Yeah, you almost need something like === in a weakly-typed language.
Quote from: Sidoh on August 28, 2011, 09:00:32 pmYeah, you almost need something like === in a weakly-typed language.I prefer to "variably lenient language"
Quote from: rabbit on August 28, 2011, 09:02:35 pmQuote from: Sidoh on August 28, 2011, 09:00:32 pmYeah, you almost need something like === in a weakly-typed language.I prefer to "variably lenient language"I've decided that I probably love ruby, but I think I still really dislike "variably lenient languages".
Quote from: Sidoh on August 28, 2011, 09:05:05 pmQuote from: rabbit on August 28, 2011, 09:02:35 pmQuote from: Sidoh on August 28, 2011, 09:00:32 pmYeah, you almost need something like === in a weakly-typed language.I prefer to "variably lenient language"I've decided that I probably love ruby, but I think I still really dislike "variably lenient languages".Make a class for each variable type that forces a explicit type. :smugface:
php also has === and !==. They're actually really useful.
I've never seen !!, but I'm guessing it converts a value to either 'true' or 'false' by negating it twice? If so, assembly's been doing that forever.
Quote from: iago on August 28, 2011, 06:20:05 pmI've never seen !!, but I'm guessing it converts a value to either 'true' or 'false' by negating it twice? If so, assembly's been doing that forever. Yeah, it coerces the value into a true Boolean (something about the phrase "true Boolean" is making me laugh). Also fun is its counterpart, !!!. (There's actually no reason for !!!, since a single ! will coerce the value into the true Boolean value opposite of the meaning of the original).