Profile_bird

Hey there! skanev is using Twitter.

Twitter is a free service that lets you keep in touch with people through the exchange of quick, frequent answers to one simple question: What are you doing? Join today to start receiving skanev's tweets.

Already using Twitter
from your phone? Click here.

skanev

  1. @tisho And we're talking programming language design here, not pragmatics.
  2. @tisho It is a design flaw, because "loose match" in a duck typed language is "non-sense", but that's where you need Type Theory.
  3. #openfest беше супер. 'nuff said.
  4. @tisho ..you've guessed it -- you violate the principle of least surprise.
  5. @tisho Nope, % is not commutative. One thinks of === as equality operator, since it *looks like* one. If it's not what it looks like, then..
  6. @tisho But occasionally, it surprises you. Hence. -PLOS. Hence, not really sugar.
  7. @tisho Well, I would argue that the concept of a commutative binary operator is pretty intuitively known. You expect === to be commutative
  8. @tisho What do you disagree with, then? :)
  9. @tisho Also, consider that (0..10) === 1, but not 1 === (0..10).
  10. @tisho Implement a new class, StringOrInteger and have '5' === SOI.new(5) && 5 === SOI.new(5). Post it as gist. Then we talk.
  11. @tisho No, you're oversimplifying it. It works, but it is semantically wrong. It eventually violates the principle of least surprise.
  12. @deimosbg Не, нямаме live streaming, но можеш да заповядаш в Интерпред. Имаме безплатно кафе.
  13. @tisho I disagree. I would quote Type Theory on that, but even 1400 words won't be enough to cover that.
  14. @tisho But then this really boils down to polymorphic binary operators being really unorthogonal to inheritance. Especially in duck type
  15. @tisho ...problem when you want to define String-like and Integer-like classes and have the same behavior for === as the default types.
  16. @tisho I would have you cast to the same type for == if they are not parts of the same hierarchy (be explicit). Otherwise, there is a...
  17. @tisho I wouldn't implement it. I would have == (equal if same type), match? (=== for case only) and is? (for current equals?).
  18. @lucho870601 Ah.
  19. @lucho870601 Why would you think that? :)
  20. My day just got one hour shorter. Damn time zone changes :)