Is CSAML a joke?


H

Howard Swope

A colleague at work has been talking a bit about XAML. I thought I would
look into it. While there are some interesting concepts in WPF, I can't
believe anyone is serious about XAML. What an incredibly painful way to
write code. Why would anyone want to do that.

At first I thought it was just a joke meant for script kiddies or novice
programmers, but then I came across an article, "C# Application Markup
Language (CSAML): An Evolutionary Leap," by Charles Petzold. Of course, his
books are well respected, so I read on. He says, "My new book Programming in
the Key of SCAML is expected to be available early in 2007. For now I want
to show you just a few examples that will let you savor the flavor of this
new syntax and be ready for the big transition when the old C# syntax is
phased out in 2008."

In my younger years, I did some web programming, but got out of that quickly
because an XML tagged structure is just a lousy way to write software. I
can't, for the life of me, figure out why people want to keep jamming a
square peg in a round hole. XML is good for some things, representing
structured data, maybe representing text formatting. It is also very good
for translating between document and data formats. No matter how you slice
it, XML is a lousy format for applications.

I am an old school C++ guy who fell in love with C#. I can't believe that it
is going to be corrupted in this fashion. Is this for real?
 
Ad

Advertisements

C

Christopher Ireland

Howard said:
At first I thought it was just a joke meant for script kiddies or
novice programmers, but then I came across an article, "C#
Application Markup Language (CSAML): An Evolutionary Leap," by
Charles Petzold.
"In fact, CSAML is able to rid itself of every symbol used in old-syntax C#.
For example, consider the following old-syntax C# assignment statement:

A = 5 * (B + 27 * C);

This statement translates without much fuss into the following chunk of
CSAML:

<ExpressionStatement>
<Assignment LValue="A">
<Assignment.Expression>
<MultiplicationExpression>
<Multiplication.Multiplier>
<Literal Type="{x:Type Int32}"
Value="5" />
</Multiplication.Multiplier>
<Multiplication.Multiplicand>
<AdditionExpression Augend="B">
<AdditionExpression.Addend>
<Multiplication.Multiplier>
<Literal Type="{x:Type Int32}"
Value="27" />
</Multiplication.Multiplier>
<MultiplicationExpression
Multiplicand="C"/>
</AdditionExpression.Addend>
</AdditionExpression>
</Multiplication.Multiplicand>
</MultiplicationExpression>
</Assignment.Expression>
</Assignment>
</ExpressionStatement>"

http://www.charlespetzold.com/etc/CSAML.html

That's got to be irony, hasn't it??

--
Thank you,

Christopher Ireland

"You can't reason someone out of a position they didn't reason themselves
into."
Author Unknown
 
G

gerry

check out the date that article was published.


Christopher Ireland said:
"In fact, CSAML is able to rid itself of every symbol used in old-syntax
C#. For example, consider the following old-syntax C# assignment
statement:

A = 5 * (B + 27 * C);

This statement translates without much fuss into the following chunk of
CSAML:

<ExpressionStatement>
<Assignment LValue="A">
<Assignment.Expression>
<MultiplicationExpression>
<Multiplication.Multiplier>
<Literal Type="{x:Type Int32}"
Value="5" />
</Multiplication.Multiplier>
<Multiplication.Multiplicand>
<AdditionExpression Augend="B">
<AdditionExpression.Addend>
<Multiplication.Multiplier>
<Literal Type="{x:Type Int32}"
Value="27" />
</Multiplication.Multiplier>
<MultiplicationExpression
Multiplicand="C"/>
</AdditionExpression.Addend>
</AdditionExpression>
</Multiplication.Multiplicand>
</MultiplicationExpression>
</Assignment.Expression>
</Assignment>
</ExpressionStatement>"

http://www.charlespetzold.com/etc/CSAML.html

That's got to be irony, hasn't it??

--
Thank you,

Christopher Ireland

"You can't reason someone out of a position they didn't reason themselves
into."
Author Unknown
 
H

Howard Swope

OK... whew...

Now can anyone tell me how to use an XMLDataProvider to bind to a WinForms
control?
 
M

Michael A. Covington

Christopher Ireland said:
"In fact, CSAML is able to rid itself of every symbol used in old-syntax
C#. For example, consider the following old-syntax C# assignment
statement:

A = 5 * (B + 27 * C);

This statement translates without much fuss into the following chunk of
CSAML:

<ExpressionStatement>
<Assignment LValue="A">
<Assignment.Expression>
<MultiplicationExpression>
<Multiplication.Multiplier>
<Literal Type="{x:Type Int32}"
Value="5" />
</Multiplication.Multiplier>
<Multiplication.Multiplicand>
<AdditionExpression Augend="B">
<AdditionExpression.Addend>
<Multiplication.Multiplier>
<Literal Type="{x:Type Int32}"
Value="27" />
</Multiplication.Multiplier>
<MultiplicationExpression
Multiplicand="C"/>
</AdditionExpression.Addend>
</AdditionExpression>
</Multiplication.Multiplicand>
</MultiplicationExpression>
</Assignment.Expression>
</Assignment>
</ExpressionStatement>"

http://www.charlespetzold.com/etc/CSAML.html

That's got to be irony, hasn't it??
EXACTLY! He's pointing out the verbosity of XML-like languages.
 
Ad

Advertisements

C

Cor Ligthert[MVP]

A colleague at work has been talking a bit about XAML. I thought I would
look into it. While there are some interesting concepts in WPF, I can't
believe anyone is serious about XAML. What an incredibly painful way to
write code. Why would anyone want to do that.
If somebody wants to walk from Paris to London, it is OK for me, as long as
he does not invite me to enjoy him.

Just my idea I got from your message.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top