On Mon, 6 Jan 2014 21:27:32 +0500
Ivanko B <[email protected]> wrote:
> I don't think it is better...
> Ouch. Another design principle of MSElang is...
> [...]
> ===================
> Quite opposite preferentions of two long-time exptrienced programmers.
> Linuxfan hates typing, Martin (anb me too) hates ambiguity &
> irregularity :) Less typing means more ambiguity and vie versa.
I don't want to speak too much - I will slow down I promise - but less
typing is not necessarily more ambiguity, I think. It depends.
There is no ambiguity when "There is exactly one way to interpret
each program statement syntactically". That's all.
For sure, to fill a language with keywords and punctuation does not
render it less ambiguous; it helps in catching typing errors, probably.
C compilers tend to throw generic errors ("parse error at near...") in
wrong places even if the language itself is not ambiguous. Pascal
instead is very precise in this, and I appreciate it.
----------------------------
>> print counter+"12" // counter is an integer
> Is the current "writeln(counter,12)" worse ? Why?
No no, writeln has nothing wrong. What is wrong is that in pascal you
can't write functions with variable number of arguments, so
write/writeln do violate pascal rules.
> But "writeln" definetely needs variations with C-style *printf
> %-formatting:
> writeln("%s%d",counter,12);
This trick is very handy, especially for international programs, and you
can do it in pascal too using "function(..., [...])" (in theory; in
practice I tried without success).
It also has a big problem, and there is no solution: you can pass
it whatever you want, even without corrispondence to the various "%xx".
When you run a program and you see strange messages like "Error: %s\n",
well, you know they used this trick and something went wrong!
Regards,
linuxfan
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk