[Haskell-cafe] How to use Data.ByteString ?
Chaddaï Fouché
chaddai.fouche at gmail.com
Tue May 19 10:20:33 EDT 2009
On Tue, May 19, 2009 at 8:46 AM, Brandon S. Allbery KF8NH
<allbery at ece.cmu.edu> wrote:
> On May 19, 2009, at 01:42 , Jason Dagit wrote:
>>
>> I've often seen this bit of scary code in VB:
>> Dim i as Integer = 5
>> If i = "5" Then
>> ' Do something, because 5 = "5"
>> End If
>
> Sure, that works in Perl too.
That's because in numeric context Perl convert strings into numbers,
so even 5 == "5 coffees" would be true... But 5 eq "5 coffees"
wouldn't since eq force a string context and 5 is converted to "5"
which is not string-equal to "5 coffees".
Perl is all about context and is coherent in its weirdness, whereas VB
is pretty screwed IIRC.
--
Jedaï
More information about the Haskell-Cafe
mailing list