[Issue 7724] 'final:' doesn't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 21 10:27:32 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7724



--- Comment #7 from Dejan Lekic <dejan.lekic at gmail.com> 2012-04-21 10:28:29 PDT ---
@Manu:
I see your point.
However, I disagree - one should learn the language, and understand where and
how "final:" can be used. I have no problems with the current situation.
Compiler also generates a helpful error message that can be understood by
anyone. I personally never use public: final: private: etc... I prefer
public{}, private{}, etc. or use these per-declaration.

@Stewart Gordon
Neither are good - the second approach makes it possible to easily make a
mistake if developer is not pedantic enough. Say a class has buch of various
methods - and in the middle of it developer decides to add a variable... I know
- bad programming practice but still possible... However, developers typically
group variables and methods, so I guess it is OK.

As I said, I like the current approach when compiler generates a descriptive
error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list