[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02716] Re: Append alias for Array.append?

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-05-10 17:43:02 UTC
List: ruby-talk #2716
Dave:
>Rather than having <<, push, append, tackOnTheEnd, enQueue, and all
>the rest, why not have just one (say <<) and then distribute a
>standard set of personality modules which set up aliases:
>   include StackLikeArrays -   adds push and pop
>   include PythonNames

Are you saying here that we should make the basic classes as simple as
possible with all the needed functionality (with one name). And then add
aliases as needed.

If I got it right, I have to say I like the idea!

Then we still have the problem being required to provide push and pop.

class InterestingDataStructure
  include JavaVector

  def push
  end
  def pop
  end
end

Now we happen to have ids.addElement, but I'm not sure is our code really
cleaner now :).

	- Aleksi

In This Thread

Prev Next