Directional Aims and Items of Consideration
This is a rough list of things we'd like to look at. Anybody can add an idea to the list (PR the website!) and each one might be reviewed and rejected by the community, but these are the specific items of consideration.
Want to help? Look down this list, or for something more concrete, check out the project list.
Meta
These are things not in the language, but around it.
- Fix library/source views on the website
- Get the opend app working easier
- Try to run unittests fast with the ctfe engine
In Active Investigation
- Safer by default - mostly finished
- Make druntime easier to port to things like webassembly and niche platforms - significant progress
- Event loop
- Change anonymous class scope lookup so you can get to local vars
- https://github.com/dlang/dmd/pull/16910
Guaranteed
These changes are obvious wins, no breakage, easy implementation, just need to make the change.
- Correct -release so it is no longer considered harmful (must not globally disable vital runtime checks without clear intent)
- increase the size of the default fiber stack
- Make `real` an alias of `double` on x86 so it isn't godawful slow ruining std.math
Probably, if easy
These changes would be nice to have. Some specifics might need to be worked out, the implementation might be difficult, it might cause breakage... all those things might remove them from the list. But, they deserve investigation and experimentation. If these items work out with minimal trouble (including managing potential breakage), we'd like to see them. If not, they might be dropped.
- `@disable("message to user")`
- `@notls`
- End explicit slice of static arrays
- Inheritance of class constructors
- Make `in` `const scope` again
- A special bitmask enum that automatically does a thing
- Make sure deprecations don't affect reflection
- Something like pragma(msg) but automatically deduplicates. e.g. "proprietary license code included"
- static foreach private vars in a local scope
- Exception.msg. It is currently a plain string, but should be a property, or even just eliminated.
- extend if(auto x = y)
- select some default function args but not others, e.g. func("s", default, "y") when you have func(string s, string x = "thing", string y = "other")
- Change importC so it doesn't break D code anymore and works better with C code. Perhaps remove import and add #import "foo/bar.h". Must namespace things in compatible way for diamond dependencies.
- Anonymous structs in more contexts. Would be nice to pass to template args.
- Fix the closure bug in foreach loops: foreach(i; 0..5) dg ~= () { use i; }
- forward named args
- Merge mixinC? ref https://github.com/dlang/dmd/pull/14114
- Bring in some kind of assert(__ctfe) detection ref: https://github.com/dlang/dmd/pull/11007/
- Allow inferring of other attributes as well as turning them back off, assuming i don't just kill them as useless bloat no-ops. Probably add opposite things (throw, impure, etc) as well as `@!thing` which just removes thing, if present, from the list. Works for compiler attributes as well as user defined attributes (and btw maybe there should be no compiler attributes and they all just recognized UDAs)
- Fix phobos? Remove autodecoding, promote more community libs to std-level of support
- Fix error messages gagging things and just giving void as the type in delegates and such
- opPass, see: https://forum.dlang.org/post/lddjmh$8rn$1@digitalmars.com
- const(Object) o ref for rebindable const object https://github.com/dlang/dmd/pull/ or better yet const(Object)~ o where the ~ represents the tailing ref.
- Fix package.d, removing the special cases based on filenames and maybe revisiting reflection over it.
- Ban user-redefined init
- Forward attributes from delegates to outside of function for callbacks ("inout for attributes"; a kind of type erasure)
- Fix class dtor impl to be actually virtual github discussion
- Define reflection access to constructors (prolly just officially say "use __ctor")
- Ban capture of variable with scoped destruction by delegate in all cases
- Improve error messages for wrong {} by guessing intent based on indentation
- Fix class destructors to actually be virtual so they work as specified
Undecided, but maybe
These items would also be nice to look into, but the cost/benefit ratio looks lower at first look.
- Return the thing if it is not a certain type or use it if it is, like rust error handling ? thing
- Type erasure on template args - you pass it as one thing, it collapses to single instance, but remembers the original use on the return of the expression.
- Type erased OOP generics
- Switch to safe by default
- Eliminate Object.factory. Maybe. Might be worth keeping anyway. Might consider auto-mixin things on interfaces to register deserializeable objects.
- Template reflection
- Make Error call stack unwinders again
- Revisit bool/int and char/int conversions
- Revisit the enum-name-inference thing for all symbols in the namespace. Ref: https://github.com/dlang/dmd/pull/14650
- Change the distribution system so you have a compiler driver and it can install support packs for different things.
- "Optimizer support pack" = ldc w/ ldmd2 (when you pass -O, it forwards the flags to that).
- "Cross compile support pack" = the runtime libraries and config stuff to enable the other platforms
- "Extended library pack" = a bunch of stuff from the dub ecosystem
- Windows resource file support made easy
- Etc.
- Change built-in unittest to be a bit better - built in named thing, new included runner, maybe make them respect privacy as if they in a different module
- Kill `version`, replace with static if
- Fix properties. This has been historically hard to implement though
- tg's __mutable
- https://github.com/dlang/phobos/pull/8806 json5 by robert schadek
- Pipeline operator
- Undeprecate `delete` and allow `new` to be redirected to a pool allocator w/ escape hatch for long lived things
- C++ style value lambdas
Nope
These things have proven to be problematic in the past and are not likely to happen.
- Focus on betterC or nogc. This doesn't mean they'll break, but they are deprioritized; there's often better ways to achieve the use cases, and even when there isn't, we can't let the nogc case hurt the common case.
Already finished
- Merge interpolated expressions
- Make a way to detect the fork: version(D_OpenD)
- Add 0o777 octal literals
- Merge the repos for a smoother dev experience (potentially makes pulling from upstream harder but makes ongoing work here much easier)
- [breaking change] Merge Jonathan Marler's wrongfully rejected bug fixes re module system ref: https://github.com/dlang/dmd/pull/7878 and https://github.com/dlang/dmd/pull/7778 - to migrate, always make sure you use the same name for `import` as for `module` statements. The old behavior would lead to potentially loading the wrong library when there were two similar ones in the import path, this removes that ambiguity.
- Class-level private (in addition to the current module-level private)
- __traits(docComment)
- Change the automatic module name procedure in dmd to change - to _
- Remove -preview=bitfields. That is a problematic C feature implemented just for C interop, but we can keep it for importC without cementing the same poor design to D proper.
- Make == work on classes with null
- Massively expand the bundled library offerings
- Allow $name in interpolation
- Get dmd build in the download
- Get my new lld-link into the distribution
- tg's tuple work
- Implicit construction (at least on return values, prolly function params too)
- opImplicitCast
- Fix pragma(linkerDirective) on mac. It should be able to bring in `-framework Cocoa` etc.
- @section(".linkersec") or something on dmd to match ldc's capability (though maybe it belongs in tocsym.d instead of toobj.d. look for userDefinedSection)
- Fix extern(Objective-C) in ldc