That argument is completely ridiculous. One thing looks like another, therefore it should be exactly the same? Really?
You haven't understood it. XML is known for having extremely over-verbose and ugly (for humans) syntax. I was designed to be easy for machines and easy to manipulate. So, if your language is not going to be XML-compatible, I don't understand a use of such XML-like syntax - that is why I asked. I'm sure it will confuse people - they will try to open your source codes using an XML editor and will be surprised it doesn't work as expected.
Anyway, how do you plan to support < and > operators?
They are a part of your synax already and they are used for a different purpose (as delimiters). This might complicate your parser a lot.
1 2 3 4
<operation> ; operation is a tag that
; allows arithmatic parsing to occur
boolean_result = arg1 < arg2 ; how do you know, < arg2 is not a start of the tag? You will have a very serious problem constructing a parser here.
</operation>
The syntax is a little verbose and inconsistent, it's true, but it's no "stranger" than many other languages
Please don't make me insult your intelligence, xorebxebx.
variable < variable
vs. expression < keyword
Small difference, no?
EDIT: Now, if Seraphimsan were to implement custom tags, it would look a little different.
variable < variable
vs. expression < tag_name
However, as long as you can't have a tag name and a variable name that are the same, there should be no problems as long as the tag name is explicitly stated to be the name of a tag.
Clover, you just implied you'd not use dot syntax. Or were you implying that you would prevent members of classes from manipulating class variables, or were you perhaps implying that there would be no class variables?
He or she wrote:
If could make a programming language I would stop crappy syntax like this:
variable-type variable;
variable.do_this_to_variable();
instead it would be:
variable-type variable;
do_this_to_variable(variable);
EDIT: Now, if Seraphimsan were to implement custom tags, it would look a little different.
variable < variable
vs.
expression < tag_name
However, as long as you can't have a tag name and a variable name that are the same, there should be no problems as long as the tag name is explicitly stated to be the name of a tag.
Nice try, but this works only for a hardcoded set of tags.
If you want the user to define its own tags, then you have a problem, because the parser has no way to know whether the given name is a tag or a variable name.
If you want the user to define its own tags, then you have a problem, because the parser has no way to know whether the given name is a tag or a variable name.
Tsk tsk. *drinks CommonTrollBGone*
If the compiler on its first pass over a source file makes a record of all the custom tags' names and then checks if any "variable names" match any of the tag names on the third pass and changes the recorded tokens appropriately, then there's no problem, is there?
Maybe I'm missing something, but why would you need to make several passes (unless an identifier can be used before its declaration)? The lexer can have access to the symbol table and decide the type of any given identifier.