November 19, 2005
In article <dlnnuu$nua$1@digitaldaemon.com>, Tomás Rossi says...
>
>In article <dlnn4u$n2f$1@digitaldaemon.com>, clayasaurus says...
>>I was saying that alias may be worse than C's typedef, since C's typedef is equivilent to an alias, but you can use alias on function names as well and I'm guessing you could alias alias's, never tried though. I'm betting you could really obfuscate code with D's alias if you wanted to. D's typedef, on the other hand, gets it right.
>
>Guess you could. But you cannot claim on D for programmers faults. I mean, you could obfuscate code with any language if you want (maybe not only with alias, typedefs or #defines). Yes, I agree that alias could be misused so to be irksome as hell. It's unavoidable from the language creator point of view because alias, #define and typedef are indispensable for things to look nice (sometimes).

This is another area where I'm just so impressed with D. Not only are typedefs fixed, but all forms of aliasing in the language now _have_ to be marked with the alias keyword - brilliant. This means people can use aliasing if they want to, but only in a way where aliases are easy to identify (both to the author and to the rest of the team). Previously aliases have been hard to spot - now they're not. Now you can't get away with kidding yourself, you have to call a spade a spade. Brilliant =)

And of course if you want to outlaw aliasing as part of your coding standard (e.g. for safety related applications) it's dead easy to enforce: you just ban the use of the alias keyword - a one line script can check for violations. I really am quite stunned with the quality of the ideas that have gone into this language. Phenomenal!

Munch


November 19, 2005
Munchgreeble wrote:
> In article <dlnnuu$nua$1@digitaldaemon.com>, Tomás Rossi says...
> 
>>In article <dlnn4u$n2f$1@digitaldaemon.com>, clayasaurus says...
>>
>>>I was saying that alias may be worse than C's typedef, since C's typedef is equivilent to an alias, but you can use alias on function names as well and I'm guessing you could alias alias's, never tried though. I'm betting you could really obfuscate code with D's alias if you wanted to. D's typedef, on the other hand, gets it right.
>>
>>Guess you could. But you cannot claim on D for programmers faults. I mean, you
>>could obfuscate code with any language if you want (maybe not only with alias,
>>typedefs or #defines). Yes, I agree that alias could be misused so to be irksome
>>as hell. It's unavoidable from the language creator point of view because alias,
>>#define and typedef are indispensable for things to look nice (sometimes). 
> 
> 
> This is another area where I'm just so impressed with D. Not only are typedefs
> fixed, but all forms of aliasing in the language now _have_ to be marked with
> the alias keyword - brilliant. This means people can use aliasing if they want
> to, but only in a way where aliases are easy to identify (both to the author and
> to the rest of the team). Previously aliases have been hard to spot - now
> they're not. Now you can't get away with kidding yourself, you have to call a
> spade a spade. Brilliant =)
> 
> And of course if you want to outlaw aliasing as part of your coding standard
> (e.g. for safety related applications) it's dead easy to enforce: you just ban
> the use of the alias keyword - a one line script can check for violations. I
> really am quite stunned with the quality of the ideas that have gone into this
> language. Phenomenal!
> 
> Munch
> 
> 

Not saying the 'alias' keyword isn't great, but what _other_ way is there to define an alias that you can think of?
November 20, 2005
In article <dlo7h0$195f$1@digitaldaemon.com>, Munchgreeble says...
>
>In article <dlnnuu$nua$1@digitaldaemon.com>, Tomás Rossi says...
>>
>>In article <dlnn4u$n2f$1@digitaldaemon.com>, clayasaurus says...
>>>I was saying that alias may be worse than C's typedef, since C's typedef is equivilent to an alias, but you can use alias on function names as well and I'm guessing you could alias alias's, never tried though. I'm betting you could really obfuscate code with D's alias if you wanted to. D's typedef, on the other hand, gets it right.
>>
>>Guess you could. But you cannot claim on D for programmers faults. I mean, you could obfuscate code with any language if you want (maybe not only with alias, typedefs or #defines). Yes, I agree that alias could be misused so to be irksome as hell. It's unavoidable from the language creator point of view because alias, #define and typedef are indispensable for things to look nice (sometimes).
>
>This is another area where I'm just so impressed with D. Not only are typedefs fixed, but all forms of aliasing in the language now _have_ to be marked with the alias keyword - brilliant. This means people can use aliasing if they want to, but only in a way where aliases are easy to identify (both to the author and to the rest of the team). Previously aliases have been hard to spot - now they're not. Now you can't get away with kidding yourself, you have to call a spade a spade. Brilliant =)
>
>And of course if you want to outlaw aliasing as part of your coding standard (e.g. for safety related applications) it's dead easy to enforce: you just ban the use of the alias keyword - a one line script can check for violations. I really am quite stunned with the quality of the ideas that have gone into this language. Phenomenal!
>
>Munch

Yeah its been designed from top to bottom with *easy parsing* in mind. This opens up the posibility of tools the quality of which we have never seen with c++. We have yet to fully unleash the power of this language.


November 21, 2005
> Not saying the 'alias' keyword isn't great, but what _other_ way is there to define an alias that you can think of?

Pointers. But then you can't easily avoid that and at least you have to put a little star in front of your identifier, which flags up to the reader that it could be an alias.

Or is that not what you were thinking of?

Munch
1 2 3
Next ›   Last »