opening a text document to show a .txt file through a browserlink

Lemniscate d_blade8 at hotmail.com
Tue Jan 7 16:52:55 EST 2003


grante at visi.com (Grant Edwards) wrote in message news:<3e14cc18$0$223$a1866201 at newsreader.visi.com>...
> In article <7396d2b2.0301021520.74988ef0 at posting.google.com>, Lemniscate wrote:
> 
> > Since this is getting crazy, from now on, I am going to go by
> > the definition of program as given on
> > http://whatis.techtarget.com/definition/0,,sid9_gci212834,00.html
> > 
> > (excerpt) 'a program is a specific set of ordered operations
> > for a computer to perform...(Note that a program is also a
> > special kind of "data" that tells how to operate on
> > "application or user data.") '
> > 
> > Okay, to me, based on this,
> > HTML/XML/SGML/ECMAScrpt/ActionScript/C/C++/Java/VB/javascript/Python
> > are all programming languages.  The 'mark-up' languages
> > represent a specific set of ordered operation for a computer to
> > perform (and thus, represent a program; which feels really odd
> > to say, to be quite honest).
> 
> I'd have to disagree.  HTML does not specify operations.  It
> more traditional programming parlance, it specifies delcares
> data.
> 
> HTML does the equivalent of a C "program" that consists of
> nothing but variable declarations:
> 
> ------------------------------8<------------------------------
> int i = 8;
> char s[] = "Hi there";
> ------------------------------8<------------------------------
> 
> Notice that no operations are specified.  Only data types and
> values. I wouldn't consider that a "program" using the cited
> definition.
> 

Hmm, a very good point and one that I want to agree with.  However,
let me play devils advocate for a moment.  Can it be said that a
program cannot have the sole purpose of specifying data types and
values?  I find that very hard to swallow whole.  Additionally, I
think that this is a bit of oversimplification.  What html does is
exactly what you say it doesn't, it gives directions for the
operations to be performed on the data.  Wrap a tag in a <i> tag and
the operation of italics is put onto the data.  It is, to me, just
like cout << "Hi There".  The browser, like the compiler, applies the
operation to the data contained in the script.  In the end, the
difference is that one is a standalone program while another needs an
interpreter.  Again, I go to the example in Python,

print "Hi there"

in a .py/.pyc file means nothing on a computer without Python.  The
data needs to be interpreted.  Again, same thing with:

print "Hi there".upper()

Is that a program?  An operation is performed.  It isn't standalone,
by any sense.

> > Since a program can also be 'data',
> 
> IMO, that does not imply that any piece of data is also a
> program.  A->B does not mean that B->A.
> 
Thanks, but I think you are a bit confused.  A->B does not mean that
B->A.  True.  Also true, but, as you said, you can write a C program
that doesn't meet your requirements, does that mean that C is not a
programming language?  Think about the answer.  I've already talked
about how it is logically impossible to exclude data without a clear
explanation, but this is another common logical problem.  If object C
is agreed to be of type A, but object C has attributes that do not
meet all of type A requirements, is object C really a type A object?

Your example:
html -> no operations are specified (your words, which I disagree
with; the data is operated on, by an interpreter, improperly written
script does not work as it should), only data -> Your conclusion: html
is not a programming language.

my counter-example
C -> can be written correctly so that no operations are specified,
only data (your example) -> my conclusion does not match the one you
must make, based on all of your arguments, namely, that C is not a
programming language.
> > It's interesting to note that the definition does NOT:
> > 1) specify whether anything has to be Turing complete (heck, I've
> > written tons of programs that aren't, but they use python and C, so
> > are python and c not languages too>)
> > 2) specify the need for the ability to calculate any numbers at all. 
> > (once again, I would say 99% of all my codes doesn't calculate
> > squares, are they not programs).
> 
> The definition does require the ability to specify operations.
> IMO, When you write HTML you are only declaring data.  
> 
Wrong, you are declaring data, as well as how it should appear when
run through an interpreter.

print "Hello there".upper()

is a program, no matter how simple or how silly.

> There are some commonly used (and even officially specified)
> conventions about what a browser is expected to _do_ with data
> of various types, but the HTML source file does not specify
> those operations.
> 
I completely disagree.  The HTML explicitly specifies what operations
are performed on the data.  Bold, italic, good ole 'flash', etc.  The
interpreter, itself, may feel free to change things and not all things
may work.  Interestingly enough, pretty similar to different versions
of compilers and interpretors.  If everything were the same
everywhere, only one version of source for any program would be
needed.  Interestingly enough, many, MANY programs are not
cross-platform.  HTML is, and I'm kind of reaching here, but this is
the sum of all the arguments, a completely cross-platform programming
language.  You are using the fact that it is cross-platform to argue
that it is not a language.  I think the reasoning is flawed at a deep
level and you are presupposing quite a few things.  Just my opinion,
by the way.
> > Feel free to disagree, I do (;-D).

As do I, lol.
> 
> OK :)

Hope you are having a wonderful New Year!!!




More information about the Python-list mailing list