RFC - One word alias for require_relative

Discussion in 'Ruby' started by Ilias Lazaridis, Jun 11, 2011.

  1. Ah!

    A creative Off-topic-Troll.

    You'll made a career on this list!

    ..
     
    Ilias Lazaridis, Jun 16, 2011
    #61
    1. Advertisements

  2. Ilias Lazaridis

    Mike Moore Guest

    [Note: parts of this message were removed to make it a legal post.]

    The OP asked for comments on the proposal for a new, more descriptive name
    for "require_relative". I have a hard time remembering if it is
    "require_relative" or "relative_require", which causes me pain and grief
    whenever I reach for "require_relative" as I'm coding. Because of this I
    would like to leave my comment.

    As I understand it, "require_relative" was introduced because of a
    fundamental change to LOAD_PATH in Ruby 1.9. Having the current directory in
    the LOAD_PATH was deemed to be a problem, and was removed for security
    concerns and a sense of correctness. This meant that "require" would no
    longer load files based on where the loading files location. Now, obviously,
    this caused issues because behavior was changed, and a way was needed to fix
    the broken code. Hence "require_relative" was introduced as the solution.

    The stated question that began this thread is what alternative to
    "require_relative" would you choose, asking only that the new single word
    was 7 characters or less. I have a word in mind, but let me first
    hypothesize on why "require_relative" was chosen in the first place. On the
    surface having a multi-word name for this functionality seems to go counter
    intuitive to Ruby's ease and flow that we all love. Why would something so
    basic have a name that was so uncomfortable? As I said earlier, I have a
    hard time even keeping the name right in my head! Why would the Ruby culture
    create and propagate something so out of place and ill-tasting?

    Why indeed. I have given this much thought. I have pondered on this subject
    throughout the interactions on this thread. Why is it so wordy? Almost
    overly descriptive? Where is the sweetness I am used to? Why hasn't Ruby
    opened her arms to embrace me with her syntactic sugar? Why? Why Matz, why?

    Could it be that "require_relative" is just a bad idea? Could it be that
    "require_relative" was left intentionally wordy as some sort of syntax
    vinegar to push people away from using that functionality? Not a punishment
    per se, but a subtle reminder that something is wrong with the assumptions
    that the code is making? A sore thumb on otherwise healthy code? But if that
    is the case, then what shorter name can we give to "relative_require" that
    would still communicate how ill-fitting and out of place the functionality
    is to Ruby? Preferably in 7 characters or less?

    My friends, I have the answer:

    alias ilias require_relative

    I sincerely hope my suggestion, a single word with 7 characters or less, can
    help bring some closure to this topic.

    ~Mike
     
    Mike Moore, Jun 16, 2011
    #62
    1. Advertisements

  3. [...]

    I guess it's time to give up.

    It's just to much off-topic trolling.

    ..
     
    Ilias Lazaridis, Jun 16, 2011
    #63
  4. Ilias Lazaridis

    Mike Moore Guest

    [Note: parts of this message were removed to make it a legal post.]

    Trolling? I'm offended! I am certainly not trolling. My message was very
    on-topic. And my suggested solution works. I even tested it and everything.
     
    Mike Moore, Jun 16, 2011
    #64
  5. Ilias Lazaridis

    Sam Duncan Guest

    involve
     
    Sam Duncan, Jun 16, 2011
    #65
  6. I must admit, you are a high-quality troll - but still a troll.

    ..
     
    Ilias Lazaridis, Jun 16, 2011
    #66
  7. Ilias Lazaridis

    Mike Moore Guest

    [Note: parts of this message were removed to make it a legal post.]


    While "involve" is a single word, it is 8 characters and not 7 characters or
    less. It appears that "ilias" is the only acceptable answer.
     
    Mike Moore, Jun 16, 2011
    #67
  8. This one sounds good!

    I think I've a new favourite!

    involve 'lib/alter'
    locally 'lib/alter' # locally located file

    uniload 'lib/alter' # universal load
    request 'lib/alter' #
    include 'lib/alter' # the commonly known "include"

    relative 'lib/alter' #

    ..
     
    Ilias Lazaridis, Jun 16, 2011
    #68
  9. Ilias Lazaridis

    Sam Duncan Guest

    You can't count.

    And furthermore, you can't read.

    optional:
    * ideally a 7 letter word

    Who is the real troll here?
     
    Sam Duncan, Jun 16, 2011
    #69
  10. Ilias Lazaridis

    Mike Moore Guest

    [Note: parts of this message were removed to make it a legal post.]


    Why are you guys picking on me? I gave you a perfectly acceptable solution!
     
    Mike Moore, Jun 16, 2011
    #70
  11. It *is* seven letters.

    Of course, it suffers from a glaring similarity with the include
    keyword, hinting more at extension of something that exists, rather
    than the requirement of something, but you win some and you lose some.

    --=20
    Phillip Gawlowski

    A method of solution is perfect if we can forsee from the start,
    and even prove, that following that method we shall attain our aim.
    =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Leibnitz
     
    Phillip Gawlowski, Jun 16, 2011
    #71
  12. [Note: parts of this message were removed to make it a legal post.]

    70 messages in and the topic becomes clear: entertain me with 7-letter
    words.
     
    Adam Prescott, Jun 16, 2011
    #72
  13. What becomes clear is this: who are the trolls.

    ..
     
    Ilias Lazaridis, Jun 16, 2011
    #73
  14. Your bad English is showing: Troll. Singular.

    --=20
    Phillip Gawlowski

    A method of solution is perfect if we can forsee from the start,
    and even prove, that following that method we shall attain our aim.
    =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Leibnitz
     
    Phillip Gawlowski, Jun 16, 2011
    #74
  15. I really wish I could be there when you go for a job interview, or
    attempt to bid on a contract and they recognise your name. I guess the
    archives for list this (or anywhere you have infected) would be the best
    resume ever...for warning the employer. Maybe that's already happened
    and this is misplaced vengeance.
     
    Matt Harrison, Jun 16, 2011
    #75
  16. Ilias Lazaridis

    Mike Moore Guest

    [Note: parts of this message were removed to make it a legal post.]

    That is the second time you implied I was a troll. Even after I told you
    directly that I am not a troll. I don't understand why you would do this.
    You don't know me. I did nothing but try to help you and yet you repay my
    kindness with libel? This defamation will not stand!
     
    Mike Moore, Jun 16, 2011
    #76
  17. I would throw some legal threats at him. Look at his previous posts if
    you're not sure how.

    Myself, I'm still waiting to see when we're all getting sued for
    libelling him...should be exciting.
     
    Matt Harrison, Jun 16, 2011
    #77
  18. "involve", reminds me "include" (which I would use naturally, but it's
    used to describe "mixin")

    After reviewing some dictionaries, I like the term "involve" even more
    than "include".

    -

    I leave the trolls now alone to discuss my English skills and to
    theorize about my job interviews and whatever other personal things
    they may find. They're trolls, don't be to hard in judging them.

    Time for some episodes of serials!

    ..
     
    Ilias Lazaridis, Jun 16, 2011
    #78
  19. Feel free to leave. Go with God, but go.

    --=20
    Phillip Gawlowski

    A method of solution is perfect if we can forsee from the start,
    and even prove, that following that method we shall attain our aim.
    =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Leibnitz
     
    Phillip Gawlowski, Jun 16, 2011
    #79
  20. Let me think... no. You haven't even been cooperative when I have been tryi=
    ng=20
    to give you the best answer to your question, by at least providing enough=
    =20
    context so that I understand why it's a real problem. And it gets more=20
    personal from there.
    As "just an exercise", it's a pointless waste of time. At best, it might=20
    enhance my vocabulary, which doesn't need the help. It also doesn't look li=
    ke=20
    fun. About the only other reason I'd do it as "just an exercise" is as a fa=
    vor=20
    to you, and given your conduct so far, replying to you is already a favor.

    What I would be happy to do is discuss why this is needed, and how/whether =
    to=20
    get it included into the core, or what a good name might be outside of your=
    =20
    artificial one-word-7-char constraint.

    But I'm not going to jump through hoops just because you say so.
    I'd normally refuse to do so even for people I respect.
     
    David Masover, Jun 17, 2011
    #80
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.