octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55767] classdef property should not be the sa


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #55767] classdef property should not be the same as classdef name (at least for Matlab compatibility)
Date: Thu, 18 Apr 2019 17:44:34 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #1, bug #55767 (project octave):

I don't know why it would cause trouble.  Even something like the following
seems like it should work.


classdef foobar
  properties
    foobar;
  end
  methods
    function obj = foobar (...)
      obj.foobar = ...;
    end
  end
end


Inside methods, isn't it required to use obj.property to access properties? 
If so, then I don't see a conflict between property names and the constructor
(class) name.  It seems to me that you could even have a method that called
the constructor to create another object of the same type without having a
conflict.

Am I missing something?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55767>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]