Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72474 > unrolled thread
| Started by | Cameron Simpson <cs@zip.com.au> |
|---|---|
| First post | 2014-06-03 15:23 +1000 |
| Last post | 2014-06-03 08:59 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: can someone explain the concept of "strings (or whatever) being immutable" Cameron Simpson <cs@zip.com.au> - 2014-06-03 15:23 +1000
Re: can someone explain the concept of "strings (or whatever) being immutable" Rustom Mody <rustompmody@gmail.com> - 2014-06-02 23:28 -0700
Re: can someone explain the concept of "strings (or whatever) being immutable" Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-06-03 08:59 +0100
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2014-06-03 15:23 +1000 |
| Subject | Re: can someone explain the concept of "strings (or whatever) being immutable" |
| Message-ID | <mailman.10595.1401774877.18130.python-list@python.org> |
On 02Jun2014 21:06, Deb Wyatt <codemonkey@inbox.com> wrote: >> Deb Wyatt <codemonkey@inbox.com> writes: >>> [no text] >> >> Deb, can you expand a bit – and write the question in the body of your >> message? It's not clear what you want explained. [...] >that's strange that you see no text. The body of my email was as follows: >"""a_string = "This is a string" [... etc ...] That is because whatever you're using for email sent both HTML and plain text, but in complete violation of sanity, left the plain text version empty. Ben's mailer is showing him the plain text version, which is perfectly reasonable, and why he saw nothing. Please adjust your mailer to send plain text only. It is all you need anyway, and renders more reliably for other people. Thank you, Cameron Simpson <cs@zip.com.au>
[toc] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2014-06-02 23:28 -0700 |
| Message-ID | <eaa83b26-c587-4f5a-ba42-efdcd74c6fae@googlegroups.com> |
| In reply to | #72474 |
On Tuesday, June 3, 2014 10:36:37 AM UTC+5:30, Deb Wyatt wrote: > That was just the first question. What does immutable really mean > if you can add items to a list? and concatenate strings? I don't > understand enough to even ask a comprehensible question, I guess. It is with some pleasure that I see this question: Most people who are clueless have no clue that they are clueless -- also called the Dunning-Krüger effect. Be assured that this question is much harder and problematic than people believe. There are earlier discussions on this on this list, eg https://groups.google.com/forum/#!topic/comp.lang.python/023NLi4XXR4[126-150-false] [Sorry the archive thread is too broken to quote meaningfully] Here's a short(!) summary: Programmer's live in 2 worlds. 1. A timeless mathematical world. Philosophers call this the platonic world after Plato's allegory of the cave: http://en.wikipedia.org/wiki/Allegory_of_the_Cave 2. An in-time world that is called "Empirical" in philosophy You cannot reject 2 because your programs run in time and produce effects (hopefully!) in the empirical world. You cannot reject 1 because the time at which you - the programmer - function is in another space-time from the run-time of your program. The very fact that you write a program means you have (been able to) algorithmize out a complex *process* into a simpler recipe - a *program*. Once you see the need for both worldviews 1 and 2 you will see why even the most deft=footed trip up doing this dance. eg. When someone says: 3 is immutable but [1,2,3] is mutable this is not a necessary fact but an incidental choice of python's semantics. Functional languages make everything immutable Assembly language makes everything mutable -- you can self-modify the code containing 3 as an immediate operand in an instruction into one containing something else.¹ However the basic (necessary not incidental) fact remains - you need to dance between the two worldviews: - platonic and empiric (in traditional philosophy lingo) - declarative and imperative (in computer theory lingo) - FP and OO styles (the two major fashions in programming languages) Choose absolutely only the first and your program can have no effect whatever including writing a result to the screen Choose absolutely only the second that you can have no comprehension of your program's semantics. You can find this further elaborated on my blog whose title is a summarization of what Ive written above: http://blog.languager.org/search/label/FP -------------- ¹Heck! Steven showed some trick to make it happen in python also But Ive not fathomed the black magic!
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-06-03 08:59 +0100 |
| Message-ID | <mailman.10600.1401782377.18130.python-list@python.org> |
| In reply to | #72479 |
On 03/06/2014 07:28, Rustom Mody wrote: > On Tuesday, June 3, 2014 10:36:37 AM UTC+5:30, Deb Wyatt wrote: >> That was just the first question. What does immutable really mean >> if you can add items to a list? and concatenate strings? I don't >> understand enough to even ask a comprehensible question, I guess. > > It is with some pleasure that I see this question: Most people who are > clueless have no clue that they are clueless -- also called the > Dunning-Krüger effect. > > Be assured that this question is much harder and problematic than people believe. > > There are earlier discussions on this on this list, eg > > https://groups.google.com/forum/#!topic/comp.lang.python/023NLi4XXR4[126-150-false] > > [Sorry the archive thread is too broken to quote meaningfully] > This list is available in maybe six different places, so I had to chuckle that you picked just about the worst possible to reference :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web