Hello,
Du verwendest also weder public noch protected noch private?
ich entscheide mich bewusst für eine der drei Varianten aus dem Pflichtgefühl heraus es explizit angeben zu sollen - bei JavaScript fehlt das entsprechende Pendant für var (global o.ä.). Sollte ich keine Angabe wählen lande ich bei einem akzeptablen private/protected-Gemisch, habe aber keine Variable offen, d.h. wenn ich nichts mache, mache ich zumindest nichts falsch. In JavaScript hingegen mache ich was falsch (Verletzung der Kapselung) wenn ich nichts mache, das finde ich irgendwie vom Design der Sprache her unschön - nicht falsch, aber unschön.
MfG
Rouven
--
-------------------
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve
-------------------
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve