May 05, 2004
"Chr. Grade" <tickle@everymail.net> wrote in message news:c7bdm6$217m$1@digitaldaemon.com...
>
> The closer D will remain related to C and Cpp, the more likely people
> are willing to have a closer look at D and programm with it and switch
> to it. D has to be intuitive for D-newbies. I merely tried D because it
> looked and felt so familiar.
> I'd be more than disencouraged if C/Cpp style casts were missing,
> because I'm simply used to them; I like them.

You will easilly get used to D casts because they better show the intention of the programmer, they are much easier to parse, and find in the code.

> >
> > I don't think it will.
> >
> > What it will do is make the compiler simpler, and the language easier to parse.  That means that the compiler will be faster, and code analyzing tools will be better.
> >
> >  -- andy


May 05, 2004
Chr. Grade wrote:

> 
> The closer D will remain related to C and Cpp, the more likely people are willing to have a closer look at D and programm with it and switch to it. D has to be intuitive for D-newbies. I merely tried D because it looked and felt so familiar.
> I'd be more than disencouraged if C/Cpp style casts were missing, because I'm simply used to them; I like them.

It seems a pretty tiny syntactic spec, don't you think?  The meaning of a cast is still utterly the same; it's just one tiny keyword which just so happens to vastly simplify things for the implementors.

 -- andy
May 05, 2004
>What do people think about first deprecating, then removing, the C style cast?

let it go,  I had to get used to the new C++ casts, so D casts should be no problem



May 05, 2004
Either D feels like C/Cpp or it doesn't. Such thing obscures the relation to C/Cpp and puts up an obstacle for frist timers.
C style casts will be cut out first. And what's next? How many times will I have to partially rewrite my code. Over and over? Every time a new compiler version is released?
Programming at Walter's and the D-community's mercy. So, that's the downside of D?

And where's the C hardcore faction?

> Chr. Grade wrote:
> 
>>
>> The closer D will remain related to C and Cpp, the more likely people are willing to have a closer look at D and programm with it and switch to it. D has to be intuitive for D-newbies. I merely tried D because it looked and felt so familiar.
>> I'd be more than disencouraged if C/Cpp style casts were missing, because I'm simply used to them; I like them.
> 
> 
> It seems a pretty tiny syntactic spec, don't you think?  The meaning of a cast is still utterly the same; it's just one tiny keyword which just so happens to vastly simplify things for the implementors.
> 
>  -- andy
May 05, 2004
Chr. Grade wrote:
> 
> Either D feels like C/Cpp or it doesn't. Such thing obscures the relation to C/Cpp and puts up an obstacle for frist timers.
> C style casts will be cut out first. And what's next? How many times will I have to partially rewrite my code. Over and over? Every time a new compiler version is released?
> Programming at Walter's and the D-community's mercy. So, that's the downside of D?

Keep in mind that the compiler version hasn't crested 1.0 yet.  I doubt there will be syntax changes within the 1.x branch.  Even within a pre-release compiler the plan is to deprecate then remove C casts, that seems reasonable.

> 
> And where's the C hardcore faction?

Not to put too fine a point on it; they're probably still coding away in C and ignoring most imperative language innovations from the last couple decades.

Chris

> 
>> Chr. Grade wrote:
>>
>>>
>>> The closer D will remain related to C and Cpp, the more likely people are willing to have a closer look at D and programm with it and switch to it. D has to be intuitive for D-newbies. I merely tried D because it looked and felt so familiar.
>>> I'd be more than disencouraged if C/Cpp style casts were missing, because I'm simply used to them; I like them.
>>
>>
>>
>> It seems a pretty tiny syntactic spec, don't you think?  The meaning of a cast is still utterly the same; it's just one tiny keyword which just so happens to vastly simplify things for the implementors.
>>
>>  -- andy
May 05, 2004
I love this hazy nuance of absolutism; especially "imperative language innovation".

>
> And where's the C hardcore faction?
> 
> Not to put too fine a point on it; they're probably still coding away in C and ignoring most imperative language innovations from the last couple decades.
> 
> Chris
May 05, 2004
Chr. Grade wrote:
> 
> Either D feels like C/Cpp or it doesn't. Such thing obscures the relation to C/Cpp and puts up an obstacle for frist timers.
> C style casts will be cut out first. And what's next? How many times will I have to partially rewrite my code. Over and over? Every time a new compiler version is released?
> Programming at Walter's and the D-community's mercy. So, that's the downside of D?
> 
> And where's the C hardcore faction?
> 

While personally I am happy with the old syntax.... it did always say to me "not C-ish".  I don't know how you can call it "like C/Cpp" when it doesn't even seem consistent with the rest of the language.

I mean, every single other way, parenthesis without letters before them mean "expression".  If I see (asdfgh), it means to me "the value of the variable asdfgh".... but if I see (asdfgh) 1, I have to realize this means "1 as a asdfgh".

Now, truthfully, the new method has a problem in conformity itself, in that cast(asdfgh) 1 still looks a bit odd in that no other C/D code is like that..... but it is worlds better to me than the old method, because it makes it clearer that it's *doing something* and not just a silly expression.

So, to me, cast(asdfgh) "feels" more like C than even the (asdfgh) I'm used to.

You don't have to agree... but, don't think it's programming at the "mercy" of anyone - unless you are going to tell me that there is not one thing you think is not *PERFECT* about C... otherwise, you were at the "mercy" of its designers as well just as much as you are now at the "mercy" of D's.

But.... if you thought C is perfect, why would you be here?

You can't have everything your way... because, it happens, sometimes we humans are wrong.  We can't help it, it just happens.  Sometimes I'm wrong, sometimes you're wrong... that's why we use groups of people to decide what is right, because if most people think one thing.... that is probably really what's right, and the others are wrong... in that case.  But next time it might be the other way around.

-[Unknown]
May 05, 2004
Chr. Grade wrote:

> 
> Either D feels like C/Cpp or it doesn't. 

I certainly hope it don't.

Lars Ivar Igesund
May 05, 2004
My point is that anyone who would refuse to change their casting syntax probably isn't looking around for new programming languages in the first place.

Chris

Chr. Grade wrote:

> 
> I love this hazy nuance of absolutism; especially "imperative language innovation".
> 
>>
>> And where's the C hardcore faction?
>>
>> Not to put too fine a point on it; they're probably still coding away in C and ignoring most imperative language innovations from the last couple decades.
>>
>> Chris
May 05, 2004
Do it! No question.

"Walter" <newshound@digitalmars.com> wrote in message news:c7b6vn$1o0h$1@digitaldaemon.com...
> Currently, D supports C style casts:
>
>     (type)expression
>
> as well as D style casts:
>
>     cast(type)expression
>
> The C style casts are tricky to parse right, and I think will cause increasing problems down the road due to the syntactical ambiguities with it. The D style cast has no such problems, and it has the advantage of being greppable (as some programming styles consider an explicit cast to be a bug, and being able to find and check them all to be a Good Thing).
>
> What do people think about first deprecating, then removing, the C style cast?
>
>