Hello everybody,

I'm getting back into some Java game programming using the (excellent)
libgdx library. It's been a couple years since I've written Java
classes from scratch and it's got me thinking.

The Java code I'm going through has lots 'final' and 'static' variable
declarations, along with public vs private vs protected.

For those of you who are Java devs in the real world ... is this
security model really important? Is it protection against other
developers somehow modifying state in your program via another package
somewhere in the system?

I've been doing Ruby code for a couple years now, and Python for a bit
longer, and while I'm not a senior level dev by any means, I have yet
to see where this security model is actually useful. Why not just keep
it simple?

For now I am writing my classes with very little protection keywords
... with as little keywords as possible actually. But I'm just getting
started and I need to read up more.

Any Java devs out there care to chime in? I'm not trying to troll,
just interested in a response from those who appreciate KISS as a
general principle.

Thanks!

-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to