Language Features

What language feature would you most like to see implemented in upcoming versions of Delphi?

My language feature request is...

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. modern code generation

    Support for better optimization, SSE , SSE2 , autoparallelization,etc....

    324 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    under review  ·  2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  2. 207 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  3. Pure Interface

    Main problem with delphi interface: can't mix interfaces with objects.
    There are also problems like: access violation when using it, perfomance problem, additional field for ref counter, bad look guid in source.

    If Delphi have got Pure interface or availabity to add abstract classes as secend, third,... inherited class all those problems should be resolved

    108 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  4. 55 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    5 comments  ·  Flag idea as inappropriate…  ·  Admin →
  5. "class helper" for interfaces

    It is possible to add utility functions to a class namespace. This is very handy because no other namespace is polluted and the instance to the class doesn't have to be passed explicitly.

    I wish to have the same for interfaces:

    TMyInterfaceHelper = interface helper for IMyInterface
    procedure MyAddedProcedure;
    end;

    It is even more interesting because Interfaces can be implemented by more than one class.

    It makes it possible to define very thin easy maintainable interfaces. All convenience functions would be in "external" interface helpers but easily accessible if needed.

    51 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  6. allow destructor for records

    It would be useful if records have automatically called destructor. Very strange why this is not supported. Because of, if record contains managed fields Delphi compiler generates something like destructor.

    47 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  7. Nilable types

    Nilable types like the Nullable types in C# 2.0.
    I don't like the Variant since it allows a lot more than int/null values t be written in a int?

    47 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  8. Multiple Inheritance support for Interfaces in native Delphi

    Objects can implement multiple interfaces but interfaces can only have one ancestor. Why can't Interfaces descend from more than one ancestor? This is a feature both C# and Java support. Delphi for .NET added support for multiple interface inheritance back in 2003 but this was never added to native Delphi.

    If an implementing object needs to implement multiple interface contracts there is no way to enforce this at compile time. If Delphi supported multiple interface inheritance you could define a single interface that inherits from two or more parents and forces implementations to implement all parents.

    An example of this…

    31 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  9. Operator Overloading for classes

    Now it is possible to overload operators for records:

    type
    TMyRecord = record
    class operator Add(a, b: TMyRecord): TMyRecord; // Addition of two operands of type TMyRecord
    class operator Subtract(a, b: TMyRecord): TMyRecord; // Subtraction of type TMyRecord
    class operator Implicit(a: Integer): TMyRecord; // Implicit conversion of an Integer to type TMyRecord
    class operator Implicit(a: TMyRecord): Integer; // Implicit conversion of TMyRecordto Integer
    class operator Explicit(a: Double): TMyRecord; // Explicit conversion of a Double to TMyRecord
    end;

    It will be great if you add operator overloading for classes!!!

    27 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Flag idea as inappropriate…  ·  Admin →
  10. Block-scoped variables à la C#'s using-statement, e.g. by extending the with-statement

    I would really love to see some way to have block-scoped variables. If these are of a reference-counted type such as interface references the reference count should automatically be released at the end of the block. I would personally suggest implementing this as an extension of the with-statement, e.g.

    with lSomeVar: ISomeInterface = GetSomeInterface do
    // ideally we get type-inference too and could thus make the variable type optional in the above statement
    begin
    DoStuffTo(lSomeVar);
    end; // <- release reference count on lSomeVar here
    // outside of this block usage of the lSomeVar-symbol should be invalid

    This would also reduce…

    25 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Flag idea as inappropriate…  ·  Admin →
  11. Shortcut property declarations

    remove the requirement for a getter/setter.

    property AProperty : string;

    rather than

    property AProperty : string read FProperty write FProperty;

    in this case FProperty is redundant.

    19 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  12. Add Constraints in Generics for primitive types

    Please make possible to add contraints in generics for simple data types.

    Possible today:
    class operator Implicit(const Value: Nullable<T>): Nullable<Extended>;

    NOT possible:
    class operator Implicit(const Value: Nullable<T: Integer>): Nullable<Extended>;

    15 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  13. Attributes with named parameters

    Since attributes will be present in Delphi 2010, I would like to request support for named parameters like the sample below

    [TPerson(Name='Gad D Lord', Age=30)]

    which is quite more meaningful than the

    [TPerson('Gad D Lord', 30)].

    Supporting this will allow
    1. Beter portability from C#
    2. Ability to specify only several parameters and the others to be defaulted
    3. Ability to change the order in which parameters are passed
    4. Have greater readability

    14 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  14. [TWebMethod]

    Since attributes will be part of D2010, shall we see one of my favourite attributes in use TWebMethod (similar to the WebMethod in .NET)?

    I really hope writing web services to be come as easy as in the .NET world.

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  15. Interfaces with events and properties

    Please plan having Interfaces support properties and event declarations.
    Such feature is already present in .NET and I don't see any obstacle in having the same in Delphi.

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    3 comments  ·  Flag idea as inappropriate…  ·  Admin →
  16. Add delegation support in properties

    Please add a support for

    private
    FData: TMyDataObject
    public
    property GetSomething: Integer read FData.DataField

    to avoid writing a getter-method for every property

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  17. swapping any 2 variables

    Being able to swap 2 variables by calling swap(var a,b) rather than doing:
    tmp:= a;
    a:= b;
    b:= tmp;

    Makes for easier to read code.

    A different name is required since "swap" is already a different procedure from original pascal, with little value today.

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  18. auto initializing and finalizing records

    It would be useful to have records with auto initialization and finalization. With this possibility the things like C++ auto_ptr or C# TNullable are implemented with less memory consumption and more elegant than based on interface using. To reach this it's sufficent to allow parameterless constructor and destructor in record types. In the case of function/procedure the call of constructor must be emited by compiler before begin and the call of the destructor must be emited after end. If record has not parameterless constructor then compiler should consider it like usual record. The compiler should not allow destructor in records…

    5 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  19. Covariant return types

    Definition:

    In object-oriented programming, a covariant return type of a method is one that can be replaced by a "narrower" type when the method is overridden in a subclass. ... This usually implies that the return types of the overriding methods will be subtypes of the return type of the overridden method.

    4 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  20. having macro support in Delphi like in C

    I've faced many persons who do not like the begin end structure. with macro support you may attract them by replacing it with {}. I've done in with Turbo C vice versa. using begin end in C language. (might not be the right place to put this request)

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1
  • Don't see your idea?

Language Features

Feedback and Knowledge Base