Assignment Versus Equality

sohcahtoa82 at gmail.com sohcahtoa82 at gmail.com
Mon Jun 27 20:33:43 EDT 2016


On Monday, June 27, 2016 at 7:09:35 AM UTC-7, Marko Rauhamaa wrote:
> Grant Edwards <grant.b.edwards at gmail.com>:
> 
> > On 2016-06-26, BartC <bc at freeuk.com> wrote:
> >
> >> (Note, for those who don't know (old) Fortran, that spaces and tabs
> >> are not significant. So those dots are needed, otherwise "a eq b"
> >> would be parsed as "aeqb".)
> >
> > I've always been baffled by that.
> >
> > Were there other languages that did something similar?
> 
> In XML, whitespace between tags is significant unless the document type
> says otherwise. On the other hand, leading and trailing space in
> attribute values is insignificant unless the document type says
> otherwise.
> 
> > Why would a language designer think it a good idea?
> >
> > Did the poor sod who wrote the compiler think it was a good idea?
> 
> Fortran is probably not too hard to parse. XML, on the other hand, is
> impossible to parse without the document type at hand. The document type
> not only defines the whitespace semantics but also the availability and
> meaning of the "entities" (e.g., © for ©). Add namespaces to that,
> and the mess is complete.
> 
> 
> Marko

XML isn't a programming language.  I don't think it's relevant to the conversation.



More information about the Python-list mailing list