cody said:
Yes C# is not a language where lots of special chars and operators fits
in, C# is more a "keyworded language".
Ya, it is a weirdly half "explicit-for-the-sake-of-explicity", half
"implicit-for-the-sake-of-simplicity" language. How else can you explain all
the little quirks that don't add up with all the other ones unless you look
at the langauge in historical context and as a whole. Looking at C#
piecemeal is depressing. The casting operator is wholly unlike anything else
in the language, 'as' is strange in that it is a casting operator that
doesn't look like the other casting operator, instead it matches up with
'is'(which is effectivly a cast that looks and acts like a comparison).
There is no explicit conversion operator, but there are explicit
conversions(which use the cast operator, brilliant). Yet, look at it from a
realistic, users point of view and it is simple, easy to use, and very
effective.
The problem is that you cannot add keywords afterwards, only "context-only
keywords" like "yield" or "value".
Eventually, the standard is going to have to expand to add new keywords or
the language will falter. I am not sold on going the whole-hog java route of
doing everything possible, including sacrificing functionality or
consistency, to keep old code compiling in new compilers.
I think migration tools might be the way to go here, something that can be
run across code and will change varaible names safely(detect collisions,
etc) and output a changlog file showing *exactly* waht changed(which VS
should be able to process and show us,
Then again, spaced and contextual keywords aren't hard to understand and
might end up being a solution to the whole problem.
If I would be a language designer creating a new language I'd reserve lots
of potential keywords at first, just in case they'll be needed at some
time.
This can be hard to do, because its so easy to say you want to reserve:
index
value
param
arg
etc, taking up half of the common variable name set,

. Plus, inevitably,
you'd find a feature you wanted to add that didn't work with the words you
already had restricted. Still, the C# team should have atleast thought
forward to generics and other 2.0 features, which were likely on the drawing
board already, and reserved the keywords they could.
Also, didn't C++ try this with underscores? The system reserved all
identifiers starting with two underscores or somethign like that, thats why
things like __int64 got so popular(and possibly one of the reasons C++ has
as much of a readability stigma attached to it as it does).
If we allow the property setters of the object only on the left side there
is no problem with ambiguity.
No, there isn't. It certainly is an interesting concept. Curious, curious. I
need to get back to my compiler one of these days, the list of ideas to
implement keeps getting longer and longer.