Re: [Tutor] Const on Python

2008-03-08 Thread Ricardo Aráoz
Jeff Younker wrote: > On Mar 7, 2008, at 7:48 PM, Ricardo Aráoz wrote: > >> Alan Gauld wrote: >> Well, I guess it's about what you think a programmer is. I think if >> you >> are a "true" programmer you'll be good in ANY language (though you may >> have your preferences) and you'll be able to do

Re: [Tutor] Const on Python

2008-03-07 Thread Jeff Younker
On Mar 7, 2008, at 7:48 PM, Ricardo Aráoz wrote: > Alan Gauld wrote: > Well, I guess it's about what you think a programmer is. I think if > you > are a "true" programmer you'll be good in ANY language (though you may > have your preferences) and you'll be able to do 80% of your work in > any

Re: [Tutor] Const on Python

2008-03-07 Thread Ricardo Aráoz
Alan Gauld wrote: > Absolutely. I totally agree that moving an organization to Python > or similar modern language is a sensible move for many applications. > Only where very high performance or scaleability are required would > Python (or similar) be inappropriate and even in the largest > organi

Re: [Tutor] Const on Python

2008-03-07 Thread Andreas Kostyrka
Am Freitag, den 07.03.2008, 21:13 + schrieb Alan Gauld: > Yes but thats not the bit that takes time in my experience its > trying to understand the problem. What exactly am I trying to > do here? Is it a suimulation exercise, a database problem? > A real-time or networking issue? Should my sol

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote > That would be true if you assume that your business practices are > established and should remain unchanged. But the essence of business > is > change, if developers all know Java/C++ you could gradually retrain > them > to learn Python. Thats true a

Re: [Tutor] Const on Python

2008-03-07 Thread Ricardo Aráoz
Alan Gauld wrote: >> In commercial practice sometimes "political" considerations make for >> crazy decisions, e.g. witnessed by me: > >> 1.) a new web service needs to be developed. >> 2.) the policy of the company is that all developers need to know C > ++/Java. >> snipped... desire to use Python

Re: [Tutor] Const on Python

2008-03-07 Thread Ricardo Aráoz
Tiago Katcipis wrote: > thanks for the help Andreas, i dont really need that much a const so i > wont do anything like that to have a const like data. I am very used to > java and c++, thats why i always used acess modifier, but i think i can > live without it now i know that it dont exist in py

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote in > (Jumping in against my better judgment :-) :-) > Hmm...sure, programming is not about typing, it is about figuring > out > what to type. With Python the conceptual activity takes place at a > higher level because - Python provides easy-to-use, high-

Re: [Tutor] Const on Python

2008-03-07 Thread Kent Johnson
Alan Gauld wrote: > The problem is as > Fred Brooks stated in his essay "No Silver Bullet" that the > real costs in development are the intengibles - the time > spent thinking about theproblem/solution and dealing with people. > They far outweigh the time actually writing code. The average > projec

Re: [Tutor] Const on Python

2008-03-07 Thread Alan Gauld
"Andreas Kostyrka" <[EMAIL PROTECTED]> wrote > Yes, the problem is, that these guys are anyway forced to have > Python/Erlang developers on board, because of external opensource > components they need to maintain. And that one fact completely changes the economics and thereby renders the lead pos

Re: [Tutor] Const on Python

2008-03-06 Thread Andreas Kostyrka
Yes, the problem is, that these guys are anyway forced to have Python/Erlang developers on board, because of external opensource components they need to maintain. Am Donnerstag, den 06.03.2008, 23:54 + schrieb Alan Gauld: > Actually I'm with the lead here. > > The cost of developing a new fea

Re: [Tutor] Const on Python

2008-03-06 Thread Alan Gauld
"Kent Johnson" <[EMAIL PROTECTED]> wrote > My experience, moving from C++ to Java to Python as the language I > use > every day at work: I did much the same journey but decided I hated Java so much I kind of bypassed it and only once used it on a real project. Instead I became an architect/desig

Re: [Tutor] Const on Python

2008-03-06 Thread Alan Gauld
> In commercial practice sometimes "political" considerations make for > crazy decisions, e.g. witnessed by me: > 1.) a new web service needs to be developed. > 2.) the policy of the company is that all developers need to know C ++/Java. > snipped... desire to use Python/Erlang > 5.) The project l

Re: [Tutor] Const on Python

2008-03-06 Thread Alan Gauld
> Now coming back to your question, that you want a non-changeable > name, > well, one can create such a beast, e.g.: > > def constant(value): > ... >class Test(object): > const_a = constant(123) > This creates a member that can only be fetched, but not set or > deleted. Only within constant

Re: [Tutor] Const on Python

2008-03-06 Thread Michael Langford
On Thu, Mar 6, 2008 at 10:51 AM, Tiago Katcipis <[EMAIL PROTECTED]> wrote: > Saddly the lab where i > work only develops on c++ for now... but everything that i can choose i will > develop with python, This is not an insurmountable problem. There are various technologies which allow you to use C++

Re: [Tutor] Const on Python

2008-03-06 Thread Tiago Katcipis
so far im starting to feel all what you have said. Im using python to implement some works on university and im felling that everything is high level, easy to use, and far easier than c++ and even java. java is less complicated than c++ but cant be compared with the simplicity of python code. And t

Re: [Tutor] Const on Python

2008-03-06 Thread Andreas Kostyrka
Am Donnerstag, den 06.03.2008, 08:35 -0500 schrieb Kent Johnson: > C++ is extremely complex. The good side of this is it gives you > tremendous control - final, const, pass by reference or value, memory > allocation, etc, etc. The bad side is that it is a lot to think about - > should this para

Re: [Tutor] Const on Python

2008-03-06 Thread Andreas Kostyrka
Well, as a philosophical argument, the public/private classification is broken by design. Why? Assuming that one considers the "protection" part as useful (which experience with dynamic languages like Python suggest is not axiomatic), because it forces you to map all roles of a given class to a f

Re: [Tutor] Const on Python

2008-03-06 Thread Kent Johnson
Tiago Katcipis wrote: > thanks for the help Andreas, i dont really need that much a const so i > wont do anything like that to have a const like data. I am very used to > java and c++, thats why i always used acess modifier, but i think i can > live without it now i know that it dont exist in py

Re: [Tutor] Const on Python

2008-03-06 Thread Tiago Katcipis
thanks for the help Andreas, i dont really need that much a const so i wont do anything like that to have a const like data. I am very used to java and c++, thats why i always used acess modifier, but i think i can live without it now i know that it dont exist in python :P. On Thu, Mar 6, 2008 a

Re: [Tutor] Const on Python

2008-03-06 Thread Andreas Kostyrka
The answer is slightly more complex. 1.) objects are either mutable or immutable. E.g. tuples and strings are per definition immutable and "constant". Lists and dictionaries are an example of the mutable kind. 2.) "variables", "instance members" are all only references to objects. Examples: # l

Re: [Tutor] Const on Python

2008-03-05 Thread bob gailer
Tiago Katcipis wrote: > Its a simple question but i have found some trouble to find a good > answer to it, maybe i just dont searched enough but it wont cost > anything to ask here, and it will not cost to much to answer :-). Well there is a cost (at least to me) to read all the extra words tha

Re: [Tutor] Const on Python

2008-03-05 Thread Tiago Katcipis
Thanks for the help John. I agree with you that the programmer is already a grow person and should know when he can modify a attribute :-). Instead when other people will be able to continue to develop on the code i writed the const would give confidence that someone would not mess with my cons

Re: [Tutor] Const on Python

2008-03-05 Thread John Fouhy
On 06/03/2008, Tiago Katcipis <[EMAIL PROTECTED]> wrote: > learning. Im used to develop on c++ and java and i wanted to know if > there is any way to create a final or const member, a member that after > assigned cant be reassigned. Thanks to anyone who tries to help me and > sorry to bother wi

[Tutor] Const on Python

2008-03-05 Thread Tiago Katcipis
Its a simple question but i have found some trouble to find a good answer to it, maybe i just dont searched enough but it wont cost anything to ask here, and it will not cost to much to answer :-). I have started do develop on python and i really liked it, but im still learning. Im used to deve