February 09, 2004
"der_held" <der_held_member@pathlink.com> wrote in message news:bvla8p$e6n$1@digitaldaemon.com...
> >there's a space in the first one between the two >
> >
> >vector<shared_ptr<T>     > works
> >vector<shared_ptr<T>> not
> >
> Java 1.5 can handle Foo<Bar<Quer>> without a whitespace between the two
>>.

So could DMC++ at one point, but I had to take it out to pass the language purity tests <g>. In any case, the foo!(t) parses cleanly with no special cases. foo<t> requires a lot of special case work in the parser, and even then one still winds up with funny rules for odd cases. As far as aesthetics goes, that depends on what you're used to. The < > was ugly to a lot of people when it first came out in C++, but people got accustomed to it over time.


February 10, 2004
it's still ugly to me.. it feels like a html-tag in c

:D

i hate html

"Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:c096si$1lbu$1@digitaldaemon.com...
>
> "der_held" <der_held_member@pathlink.com> wrote in message news:bvla8p$e6n$1@digitaldaemon.com...
> > >there's a space in the first one between the two >
> > >
> > >vector<shared_ptr<T>     > works
> > >vector<shared_ptr<T>> not
> > >
> > Java 1.5 can handle Foo<Bar<Quer>> without a whitespace between the two
> >>.
>
> So could DMC++ at one point, but I had to take it out to pass the language purity tests <g>. In any case, the foo!(t) parses cleanly with no special cases. foo<t> requires a lot of special case work in the parser, and even then one still winds up with funny rules for odd cases. As far as
aesthetics
> goes, that depends on what you're used to. The < > was ugly to a lot of people when it first came out in C++, but people got accustomed to it over time.
>
>


February 10, 2004
actually, the c++ language rules are very stoopid in that case.

you have to be able to specifically parse <Type> and <int> and such tokens after template tokens, but you are not allowed to specifically parse >>... thats utterly stupid, really.

"davepermen" <davepermen@hotmail.com> schrieb im Newsbeitrag news:c09vms$2slm$1@digitaldaemon.com...
> it's still ugly to me.. it feels like a html-tag in c
>
> :D
>
> i hate html
>
> "Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:c096si$1lbu$1@digitaldaemon.com...
> >
> > "der_held" <der_held_member@pathlink.com> wrote in message news:bvla8p$e6n$1@digitaldaemon.com...
> > > >there's a space in the first one between the two >
> > > >
> > > >vector<shared_ptr<T>     > works
> > > >vector<shared_ptr<T>> not
> > > >
> > > Java 1.5 can handle Foo<Bar<Quer>> without a whitespace between the
two
> > >>.
> >
> > So could DMC++ at one point, but I had to take it out to pass the
language
> > purity tests <g>. In any case, the foo!(t) parses cleanly with no
special
> > cases. foo<t> requires a lot of special case work in the parser, and
even
> > then one still winds up with funny rules for odd cases. As far as
> aesthetics
> > goes, that depends on what you're used to. The < > was ugly to a lot of people when it first came out in C++, but people got accustomed to it
over
> > time.
> >
> >
>
>


February 10, 2004
While it was 10/2/04 7:04 am throughout the UK, davepermen sprinkled little black dots on a white screen, and they fell thus:
> actually, the c++ language rules are very stoopid in that case.
> 
> you have to be able to specifically parse <Type> and <int> and such tokens
> after template tokens, but you are not allowed to specifically parse >>...
> thats utterly stupid, really.
<snip top of upside-down reply>

You'd need to specifically _tokenise_ >> - a whole new concept.  That is, unless you really want to explicitly define

TempParams ::=
TempParams ::= TempParams TempParam ','
TempInst ::= TempName '<' TempParams TempParam '>'
TempInst ::= TempName '<' TempParams TempName '<' TempParams '>>'

OK, so I'm not sure if this would be a parsing nightmare....

Stewart.

-- 
My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment.  Please keep replies on the 'group where everyone may benefit.
February 11, 2004
i know c++ is a parsing nightmare anyways. but fact is, you need to spefically parse templates anyways. < and > have to be handled specially. why not >> then, too?

first: Walter stated he has done this in dmc first, so it's definitely not impossible (and even for him, it felt logical to do it by default). second: other languages, that adopted it, are able to parse it, too. namely c# comes to mind (but i'm unsure:D i'm just sure i've seen one).

then again. what's the discussion about? we have D :D

"Stewart Gordon" <smjg_1998@yahoo.com> schrieb im Newsbeitrag news:c0b050$1ha6$1@digitaldaemon.com...
> While it was 10/2/04 7:04 am throughout the UK, davepermen sprinkled little black dots on a white screen, and they fell thus:
> > actually, the c++ language rules are very stoopid in that case.
> >
> > you have to be able to specifically parse <Type> and <int> and such
tokens
> > after template tokens, but you are not allowed to specifically parse
>>...
> > thats utterly stupid, really.
> <snip top of upside-down reply>
>
> You'd need to specifically _tokenise_ >> - a whole new concept.  That is, unless you really want to explicitly define
>
> TempParams ::=
> TempParams ::= TempParams TempParam ','
> TempInst ::= TempName '<' TempParams TempParam '>'
> TempInst ::= TempName '<' TempParams TempName '<' TempParams '>>'
>
> OK, so I'm not sure if this would be a parsing nightmare....
>
> Stewart.
>
> -- 
> My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment.  Please keep replies on the 'group where everyone may benefit.


February 13, 2004
"davepermen" <davepermen@hotmail.com> wrote in message news:c09vms$2slm$1@digitaldaemon.com...
> it's still ugly to me.. it feels like a html-tag in c

The nice thing about the ! is it doesn't overload any other use of !, and so it parses like a champ. I'm a bit surprised ! wasn't used as a binary operator long before. Easy to parse also means things like color syntax highlighting are going to work right without having to build a C++ compiler into the editor.

>
> :D
>
> i hate html

LOL. I like HTML's predecessor, RUNOFF, which used dot commands. HTML's main problem is it is so poorly defined (I found 3 different definitions of what a comment in HTML was), that different interpretations of it have produced a bit of a mess.


February 13, 2004
html has another issue.. redundancy. same for xml.

xml is espencially stupid, because it tries to have "one unified solution to a specific data representation", while it provides at least 3 for the same data.

<tag></tag>
is equal to
<tag />

<tag a="." />
is equal to
<tag a="."></tag>

and technically can be done with
<tag><a>.</a></tag> as well


instead of xml, i prefer this own one:

html(
    head(
        title("Title of Page")
    )
    body(
        bgcolour("black")
        font(
            colour("white")
        )

        h1("Hello on my Page")
        p("lele.. not much in here yet")
    )
)

or..

window(
    title("Sure you want to overwrite?")
    button(text("OK") default("true"))
    button(text("Cancel") escape("true"))
)

<tag></tag> is stupid. tag() works much nicer, and shorter:D (and can, if
you add the proper ',' in between, directly get parsed as code, with
function calls in:D)

"Walter" <walter@digitalmars.com> schrieb im Newsbeitrag news:c0itgs$2d6f$1@digitaldaemon.com...
>
> "davepermen" <davepermen@hotmail.com> wrote in message news:c09vms$2slm$1@digitaldaemon.com...
> > it's still ugly to me.. it feels like a html-tag in c
>
> The nice thing about the ! is it doesn't overload any other use of !, and
so
> it parses like a champ. I'm a bit surprised ! wasn't used as a binary operator long before. Easy to parse also means things like color syntax highlighting are going to work right without having to build a C++
compiler
> into the editor.
>
> >
> > :D
> >
> > i hate html
>
> LOL. I like HTML's predecessor, RUNOFF, which used dot commands. HTML's
main
> problem is it is so poorly defined (I found 3 different definitions of
what
> a comment in HTML was), that different interpretations of it have produced
a
> bit of a mess.
>
>


February 13, 2004
Walter wrote:
>
> LOL. I like HTML's predecessor, RUNOFF, which used dot commands. HTML's main
> problem is it is so poorly defined (I found 3 different definitions of what
> a comment in HTML was), that different interpretations of it have produced a
> bit of a mess.

hehe, I think it got that way because non-programmers were writing HTML and constantly screwing up but rather than tell them to learn the language they modified it to suit them.  This was definately the case with paragraph tags.


Sean

February 13, 2004
Walter wrote:
>>i hate html
> 
> 
> LOL. I like HTML's predecessor, RUNOFF, which used dot commands. HTML's main
> problem is it is so poorly defined (I found 3 different definitions of what
> a comment in HTML was), that different interpretations of it have produced a
> bit of a mess.

HTML would be better if it was Lisp.  (not only is the syntax simpler and easier to parse, but you obliviate any distinction between content and 'client side scripting')

 -- andy
February 13, 2004
davepermen wrote:

> html has another issue.. redundancy. same for xml.
> 
> xml is espencially stupid, because it tries to have "one unified solution to
> a specific data representation", while it provides at least 3 for the same
> data.

XML is painfully verbose, but it's not so bad otherwise.  I think the attribute vs. contained element distinction is useful for separating identity data from other data.


Sean