POLS = principle of least surprise

Some of the languages I came across at uni were Java and BLUE (can
anyone remember the acronym?)
http://en.wikipedia.org/wiki/Blue_(programming_language) , so that
could explain it.

Andrew

On Mon, Apr 26, 2010 at 9:52 AM, Simon Macneall <[email protected]> wrote:
> Sorry, that's not modeled after any C++ I know. C++ lets you define access
> levels on a per function basis too.
> as a side note un-POLS? What's that mean?
>
> Simon
>
> On Mon, 26 Apr 2010 07:40:50 +0800, Gregory McIntyre <[email protected]>
> wrote:
>
>> Most Ruby features are modelled after some other language. This one is
>> like C++. I guess mostly it'd be Java programmers that would find this
>> irksome and un-POLS.
>>
>> On 25 April 2010 12:00, Simon Macneall <[email protected]> wrote:
>>>
>>> yes, but that then makes any method declared after the 'private' string
>>> private. Which means that method declarations aren't self contained, you
>>> need to know what has gone before in the file.
>>>
>>> so
>>>
>>> class Foo
>>>  def bar
>>>   :bar
>>>  end
>>> private
>>>  def baz
>>>   :baz
>>>  end
>>>
>>>  def this_is_private_too
>>>   :doh
>>>  end
>>> end
>>>
>>> Simon
>>>
>>>
>>> On Sun, 25 Apr 2010 09:49:25 +0800, Nicholas Jefferson
>>> <[email protected]> wrote:
>>>
>>>>> One minor glitch that annoys me is that you can't declare a method
>>>>> private in the method definition itself.
>>>>
>>>> class Foo
>>>>  def bar
>>>>    :bar
>>>>  end
>>>> private
>>>>  def baz
>>>>    :baz
>>>>  end
>>>> end
>>>>
>>>> foo = Foo.new
>>>> p foo.bar
>>>> p foo.baz
>>>>
>>>> Thanks,
>>>>
>>>> Nicholas
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Ruby or Rails Oceania" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/rails-oceania?hl=en.
>>>
>>>
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to