[Tutor] From C to Python
kent37 at tds.net
Thu Jul 5 17:33:04 CEST 2007
Alan Gauld wrote:
> "Dhruva Kulkarni" <dhruva_lives at yahoo.com> wrote
>> Also, i couldn't find the keywords for data encapsulation
>> ( private protected in c++ )..
> More seriously, much of the data protection used in C++ is
> due to the contraints of using a static, strictly typed data model.
> Once you get used to doing OOP using dynamic typing the
> need for that level of control becomes much lower. Again its
> the C/C++ culture of absolute control of the data showing through.
> Thats only really needed when you have to worry about byte
> alignment and register usage etc etc.
Reminiscing...when I first learned Java I was doing a lot of C++ coding.
For a while I missed the expressiveness of C++, where you can say
*exactly* what you mean, for example in the use of const.
After a while I realized that all that expressiveness didn't really buy
me much safety or functionality, and that I was better off without it
because it is just less to think about.
Switching from Java to Python I had to give up on static typing and
realize that again, it is a lot of conceptual and (finger) typing
overhead that doesn't really buy that much in safety or functionality.
Python skips all the bondage-and-discipline and goes straight to working
code ;-) Now I look at Java and cringe and can't imaging writing
C++...the biggest risk of learning Python is that you won't want to use
any other language again :-)
More information about the Tutor