Top 5
Aarti_pl
aarti at interia.pl
Thu Oct 9 04:59:30 PDT 2008
Andrei Alexandrescu pisze:
> Ok, per Aarti's suggestion: without speaking officially for Walter, let
> me ask this - what do you think are the top issues you'd like to see
> fixed in D?
>
> Andrei
My current top 5 (+ extensions :-) ):
1. Tango/Phobos merge
minimal: merge runtime - high priority
good : minimal + compatibility in low level modules e.g. IO,
variant, core types
perfect: full merge of libraries
2. Working process of error handling / better communication with community
minimal: bugs blocking most important libraries in D and
long standing bugs should be solved first, before
other tasks.
good : A bit more discussion when there is different point of
view from Walter, and from bug/enhancement reporter. I
saw (and unfortunately also experienced it) few times
that bug was changing few times status from open ->
invalid -> reopen -> wontfix -> reopen. That's really
discouraging for reporters: filling good report is
really time consuming, so shouldn't be dismissed
without good understanding of problem.
perfect: Walter drops his backend and work together with LDC
(previously LLVMDC) team on modernized compiler.
Probably one reason of current situation is lack of
manpower. Completely open frontend and open process
should solve also this problem. If Walter would decide
to go this way, it could happen as soon as llvmdc reach
production quality on major platforms.
3. Destructors are not very usable as it's not possible to call in them
methods on member objects. It makes imposible to close e.g. file in
destructor, so there must be special API to make it. It's error prone
and should be done automatically.
Side note: I know that this might be difficult to achieve because of way
GC work. But it probably is doable somehow (using reference counting?)
4. Uniform syntax for templates
http://d.puremagic.com/issues/show_bug.cgi?id=1827
I will send additional post with examples of proposed syntax. I just
need a little bit more time.
5. Anchored types
http://d.puremagic.com/issues/show_bug.cgi?id=1835
It is very usable for dupping (cloning) of objects and for call
chaining. With this implemented, cast should appear really rarely in
code, what will be clear win over existing major languages like e.g.
Java, C++.
----
Extensions :-)
6. Variable arguments functions.
Current way of reading arguments is really ugly. Reading hidden
variables to get access to function arguments breaks all rules of good
style programming.
One way of fixing it probably would be define simple struct in Object.d
which will keep pointer to TypeInfo and pointer to data as void*. There
could be also used variant type as a container for arguments. Then
function signature would look like below:
void writefln(Args[] args ...)
As a result arguments could be read as normal D type safe variadic
argument functions. It will also allow to pass variable arguments to
other functions, which is currently *very* inconvenient.
I think that variable arguments functions shouldn't be depreciated in
favor of variable argument templates. At least not yet.
7. Keywords with underscores in them are ugly.
One can say that it is another example of bicycle shed color problem.
But at least I can say that this ugliness is well established in
*modern* programming languages. Java people will probably never agree
that this is good notion for keywords. I unfortunately don't know what
is status of underscores in C#, Python, Ruby.
Examples in D language:
__traits, __FILE__, __LINE__, foreach_reverse()
8. foreach() should be more universal.
It should have a form of foreach(Element element; Iterator iterator).
Other syntaxes which allows to apply different policies of iterating
collection would be ok also. If this change would be introduced
foreach_reverse should be just dropped from langauge.
9. Removing SFINAE.
Actually I use SFINAE in doost serializer to discover if templated
function was defined by user in his/her class. But as I understand it is
possible to use __traits(compile, ......) in 2.0 to get the same effect
without all problems of SFINAE, which occurs when you make simple syntax
error in your code...
10. 3 versions of functions for const correctness
Defining 3 versions of functions to just be const correct is definitely
not the right way. It should be fixed.
11. Real properties
Not big priority for me, but it would be nice...
Best Regards
Marcin Kuszczak
(aarti_pl)
More information about the Digitalmars-d
mailing list