Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:+ operator for string concat? (Score 0) 729

Is because JavaScript seems to randomly decide whether it will return a "11" or "2", while in a strong-typed language the result is deterministic. On Java you knows that "A" is a string and "B" is a integer, so A + B will always returns a string "11". Whereas Javascript are not sure about the types used in A and B, so therefore is no way to be sure about what he is going to return.

Comment Re:+ operator for string concat? (Score 0) 729

I usually have a worse problem, which is when Javascript arbitrarily decides that my string variable is an integer or vice-versa. You create a string, but then you discovers - when trying to use a string function like split() - that Javascript decided to treat your string as a integer, making the split() fails without error messages.

Comment Re:The idea of variant (var) (Score 1) 729

Because variants are useful when you want to (or most common, you need to) make a generic function to handle some information where you have no way of knowing if the input parameter will be a string, integer, long, etc. Of course it is slower than dealing with a defined type, but is usually more convenient than trying to create a separate function for each possible entry type.

Comment Re:Would it really be worse without patents? (Score 1) 75

This. The north-american justice system is so fucked up that in practice there is no justice at all. North-americans are in practice at your own risk in the market with no protection of justice, where whoever has the most money is who wins per more wrong he is.

(The legal system is as broken as google translator, the damn thing is crap)

Comment Re:Dear Lord, what has happened to Slashdot?! (Score 1) 41

Well, some comments are funny and welcome. The problem lies in the fact that now is so easy to use a computer that the the football captains and the cheerleaders are appearing on Slashdot to comment (why, I really do not know), but without the necessary capacity and cultural baggage to comment something useful or interesting.

But that said, it is important that you (and I, others, etc.) be tolerant, because though some are obviously stupid comments (like those involving bodily functions) others may not be stupid, being only slightly below what you (and me) think is good.

Slashdot Top Deals

According to the latest official figures, 43% of all statistics are totally worthless.

Working...