Add shorthand aliases for primitive types #3790
Conversation
Thanks for your pull request and interest in making D better, @ryuukk! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3790" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the benefit? Users already know these are fixed sized types, that doesn't need to be made clearer.
It's consistent, less typing, it is clear, and for people who want to learn the language, it's straight forward too, lets you add more types and follow same consistent scheme (cent, SIMD) |
Not C, C#, C++ or Java.
Walter has already explained why he's against it: https://forum.dlang.org/post/sq65vr$1huq$1@digitalmars.com But even if the proposed names are better, introducing synonyms does not make the language easier, because it introduces the question which one to use.
No, the current convention of typeNN (e.g. |
They are dying languages
That doesn't mean he is right about it, we can disagree with him
i can understand that, that is a good point
Things would be easier if we could have some sort of global aliases/types like custom object.d |
Anyone else? i'd rather see this be closed asap if nobody wants it than stay open and me waiting for an opinion Alternatively i could instead lobby for a way to get global aliases instead (via global module C# global using, or C/C++ PCH ), please let me know Thanks! |
I'm going to close this because I see no way this gets in like this.
If you still want to pursue this, maybe when ideas for D3 comes up or C/C++/C#/Java are not top 10 languages anymore, feel free to propose this again. I suggest to post in the newsgroup in that case, that's more visible than a pull request discussion. |
I have them in a personal module, but i am tired of importing that module everywhere
I think having them in object.d is a nice idea, even though i'd like the language to support that out of the box like every other languages out there, but i don't know how to do that, unfortunately