> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Edward K. Ream
> Sent: Friday, September 20, 2013 8:14 AM
> To: [email protected]
> Subject: On Topic: Intuition Pumps

 [snip]

> "The general technique of making a more-or-less educated guess, working
> out its implications, and using the result to make a correction for the next
> phase has found many applications."

Okay.

> 1. "Isn't it true that Python and C programmers design their programs in
> pretty much exactly the same way?  If so, what *exactly* is it about C that
> could not be duplicated in Python?"

Here is my guess.  Please help me work out the implications (probably by 
performing an experiment or finding relevant reference material).

In a statically typed environment (C?), a string "Hello" stored at memory 
location 1100 ends at memory location 1105 and looks like this on the wire: 
"Hello". (Bits actually, you know.)

In a dynamically typed environment (Python?), a string "Hello" stored at memory 
location 1100 ends at memory location 1134 and looks like this on the wire: 
"STRING;CHARSET=UTF-8;CONTENT=Hello". (Bits, actually, and obviously all the 
content other than Hello could be encoded in a far more space efficient way 
than I've done here, you know, by representing that information in some binary 
form.)

I believe that the great compile-time (static) typing vs. run-time (dynamic) 
typing debate goes like this:

Well, how do you know what type of data is at location 1100?

Static typing response: I put it there, and during compile time I checked all 
the other bits of code that might ever read that location, and I'm sure they 
already know what type it is, too.

Dynamic typing response: The first few bits of each chunk of data are reserved 
for identification purposes.

I hope this helps.  Most of all I hope that someone replies with an "Well, 
actually..." response.  Those are the best. :)

Cheers,
--Dave

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to