Hacker Newsnew | past | comments | ask | show | jobs | submit | yb66's commentslogin

> Wanting to protect your children does not excuse censorship.

If we're not using principles to protect people, what are they for?


I can't tell if you're missing the point or if you're really implying what I think you're implying.

You're the kind of person that makes me toss and turn at night. That's the mentality of people that support Prop8.


Neither, I asked a question which you didn't answer and instead decided to respond with ad hominem. Ad hominem is the sign of a lost argument, so either answer the question or remain a loser in this debate.


Hahaha. You're funny. That's rich.

I'm not having this discussion with you. Having principles and exerting your own beliefs of morality as censorship on the masses are not the same thing and you're a jackass for acting like it is and then spending half of your post trying to use debate rhetoric to "win". That was just embarrassing.


Please stop.


Since we're talking about Wikipedia, let me direct you to an article that may be helpful: http://en.wikipedia.org/wiki/Perfect_solution_fallacy

;-)


Just a reminder of duck typing:

Haskell style => function applied to parameter, e.g f(x) Ruby duck type style => parameter applies function to itself e.g x.f()

An example:

  module Dialable
    def dial
      # do stuff with self
      puts "Dialling..."
    end
  end
  
  # I wouldn't do this, but...
  class String
    include Dialable
  end
  
  # So, phone number as a string can be dialled
  my_phone_number = "01 23 45678"
  my_phone_number.dial
  Dialling...
  
  # I'd rather do this
  class PhoneNumber < String
    include Dialable
  end
  
  my_phone_number = PhoneNumber.new "01 23 45678"
  my_phone_number.dial
  Dialling...
  
  # now you get an error on non phone number strings
  "just a random string".dial
  NoMethodError: undefined method `dial' for "just a random string":String
  
  my_phone_number == "01 23 45678"
  => true
  
  my_phone_number == "just a random string"
  => false

You get all the regex and string functions for free too.


Ah, I see. I don't really know what's idiomatic in Ruby anymore; I haven't used it in anger for nigh on 5 years now :).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: