Delphi Programming
No edit summary
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
{{Template:Delphi Suggestions}}
These are things the next Delphi could include, these are pointers for nick and the team, many of these were comments from delphi users.
 
   
  +
These are things the next version of Delphi could include. These are pointers for [[Nick Hodges|Nick]] and the team. Many of these were comments from Delphi users on Borland Newsgroups and Personal Weblogs.
==IDE Extensibility==
 
  +
* [[Delphi Suggestions - General|General]]
a greater extensibility of the IDE, the possibility to just extend
 
  +
* [[Delphi Suggestions - IDE|IDE]]
everything from the designer to the compiler, an oo view of the source code,
 
  +
* [[Delphi Suggestions - VCL|VCL]]
possibility to use a third parts or open source compiler in order to go on
 
  +
* [[Delphi Suggestions - Compiler|Compiler]]
new platform (if borland can do it)
 
  +
* [[Delphi Suggestions - Platforms|Platforms]]
 
  +
[[Category:Delphi Suggestions]]
==Renew the VCL==
 
- a renew of the optimal but old VCL, but more an abstraction layer for
 
portability on other platforms, windows native made from borland and from
 
third parts or open source on other platforms (if borland can do it)
 
- diminish the technological gap between vcl and dot net framework that with
 
version 2 it begins to become enormous like generics, heavy use of
 
interface, ...;
 
 
==XAML==
 
- support xaml format natively, probably accept it as another format for DFM files (Text/Binary/XAML) for both Win32 and .net
 
 
==Open Source==
 
- a greater support for open source project like fpc, lazarus, fastcode;
 
- become a collector of technology.
 
 
==DCU and Packages==
 
Reinvent the dcu format, (packages of precompiled code and compiler state that can be transformed
 
into assembler x86, x64, amd, .net, win32, Linux, java, etc.).
 
DCUs and Packages should also compatible between versions.
 
 
==Chrome?==
 
Implement all the features of Chrome http://www.chromesville.com/language/ or buy it and integrate into Delphi.
 
 
==Genrics==
 
MyList := TGenericList<TMyObject>.Create ;
 
Widths := TGenericList<Integer>.Create;
 
 
==Var Initialization==
 
 
 
var
 
I: Integer = 0;
 
begin
 
 
 
instead of
 
 
var
 
I: Integer;
 
begin
 
I := 0
 
 
==Automatic Create/Free==
 
Automatic call of Create/Free for objects created in a
 
function/method by using a specific language keyword :
 
 
var
 
S: TStringList;
 
begin
 
try
 
[...]
 
S := TStringList.Create;
 
S.Add('hi !');
 
[...]
 
finally
 
S.Free;
 
end;
 
end;
 
 
Are the calls to Create() and Destroy() _really_ useful ?
 
We should be able with the usage of a keyword or a special
 
character to reduce this to :
 
 
var
 
S: TStringList; auto;
 
begin
 
S.Add('hi !');
 
end;
 
 
Obviously, the usage of this syntax
 
would embed try/finally statements in order to free the object
 
even if an exception is thrown inside the function).
 
 
If the constructor takes parameters, they could be provided in
 
the VAR section :
 
 
procedure SaveFile(const AFilePath: string);
 
var
 
S: TFileStream(AFilePath); auto;
 
begin
 
[...]
 
end;
 
 
==Multithreading==
 
procedure DoSomethingInAThread (AString:String;AnInteger:Integer); async;
 
procedure DoSomethingElseInAThread (AString:String;AnInteger:Integer); async group 3;
 
procedure DoSomethingElse2InAThread (AString:String;AnInteger:Integer); async group 3;
 
 
This would execute the procedure in a separate thread....
 
 
Maybe TTimer should also have it's own thread.
 
 
With all these multi-core CPUs getting to the market, this is getting more and more a priority.
 
 
global list of threads where threads are
 
registered upon construction and unregistered on destruction. Than this
 
list would have a method GetCurrentThread: TThread, so one can retrieve
 
the thread that is currently running
 
 
===Waiting for Threads to finish===
 
WaitForThreads;
 
WaitForThreads(3);
 
==Interfaces==
 
The VCL should make more use of interfaces... maybe even the DataSet should be changed to be an interface.
 
 
the use of *is* could also check if a class has a specific interface:
 
 
for i in Form.Components do
 
if (i is iDataSet) and (i.Active=false) then i.Open;
 
 
also,
 
 
we could have a huge list of generic interfaces that could be implemented by multiple components:
 
* Networking
 
* Messaging
 
* Databases
 
* Behavioral
 
* ...
 
 
==Case==
 
allow case to handle more than ordinals, and handle more than lists.
 
 
case s of
 
'abc': DoSomething;
 
'xyz': begin
 
DoLots;
 
DoLots;
 
DoLots;
 
end;
 
else
 
DoSomethingElse;
 
end;
 
 
case Sender of
 
Button1: DoSomething;
 
BitBtn13: DoSomethingElse;
 
CheckBox1: case ListBox1.Items.Count of
 
<10: DoSomething;
 
10..12: DoSomethingElse;
 
>12,<25: DoThis;
 
>=25: DoThat;
 
end;
 
end;
 
 
==Map==
 
function map(p:procedure; a:array);
 
 
example:
 
var a:array of Integer;
 
s:Integer;
 
 
procedure addsum(i:integer);
 
begin
 
s:=s+i;
 
end;
 
 
s:=0;
 
map(addsum,a);
 
writeln(s);
 
 
== Split,Join, Push and Pop ==
 
for Arrays;
 
 
==Try==
 
Why do we have to do:
 
 
try
 
try
 
// yada
 
except
 
// yada
 
end;
 
finally
 
// yada
 
end;
 
 
rather than
 
 
try
 
// yada
 
except
 
// yada
 
finally
 
// yada
 
end;
 
 
 
==Themes==
 
full XP/Vista Theming, not just a manifest that messes-up your panels
 
 
==Scaling==
 
 
==Better ImageLists==
 
32-but PNG support in TImageList/TImage. many currently use third party components but it should be supported natively by Delphi.
 
 
==Easier i18n, l10n==
 
Embed something like multilizer, but faster, and built-in
 
* Generate One Multilang EXE (automatic switching, or call a procedure in System to change the language)
 
* Generate One Simple EXE, and Language DLLs (automatic switching, or call a procedure in System to change the language)
 
* Generate One EXE per language
 
 
==Version Control==
 
Better integration with non-borland SCMs such as subversion, cvs, vss ...etc.
 
 
==Regular Expressions==
 
var
 
a:array of string;
 
s:string;
 
 
readln(s);
 
for a in RegExpMatch(s,'/(.*)/') do
 
begin
 
writeln a[1];
 
end;
 
 
RegExpReplace(s,'/([a-z])/',inttostr(ord(RegExpMatch(1)));
 
 
==Language Constructs==
 
* Multiline String Constants
 
* Anonymous Arrays
 
* Anonymous functions/procedures
 
*
 
 
==Pascal==
 
* allow the end before an else statement to have a semicolon;
 
* a better syntax for the with statement, see qc for various suggestions.
 
 
==Class Helpers==
 
Even though they started as a hack, having multiple class helpers for a class would be nice to have
 
 
==MutiCast Events==
 
Allow events to fire multiple methods, which can be disabled at runtime/designtime.
 
 
instead of
 
p:=DataSet1.OnAfterUpdate;
 
DataSet1.OnAfterUpdate:=nil;
 
//Do Something Here
 
DataSet1.OnAfterUpdate:=p;
 
 
you would:
 
for p in DataSet1.OnAfterUpdate do p.Enabled:=false; //this disables all events here
 
//Do Something Here
 
for p in DataSet1.OnAfterUpdate do p.Enabled:=true; //this disables all events here
 
 
or even
 
DataSet1.OnAfterUpdate.FindMethod('DataSet1AfterUpdate').Enabled:=false;
 
 
 
==Arrays==
 
Allow Array Keys to be other than integers.
 
 
This includes an optimzed string-based hash.
 
as well as the ability to use any data type as an index ....
 
 
var
 
Captions: Array[TComponent] of String;
 
C:TComponent;
 
begin
 
for C in Components do
 
Captions[C]:=C.Caption;
 
 
//Do Some Stuff
 
result:=join(' ',Captions);
 
end;
 
 
==Todo==
 
Better Todo, maybe linked to a function/procedure/method/line#
 
 
==Source Docs==
 
DelphiDoc, a system similar to JavaDoc.
 
 
==Modular Delphi==
 
Easily Split DataModules, Units, ...etc into separate DLLs/Libraries/Assemblies. with a simple directive , this would allow ISVs to simply separate parts of their systems and deploy whatever their customer has purchased.
 
 
==Databases==
 
A transformation layer between .NET's ADO.NET DataSets and the VCL ClientDataSet.
 
 
==Accecibility==
 
 
==Unicode VCL==
 
 
==New DBGrid==
 
A newer DBGrid that looks good, and has optional:
 
* Sorting.
 
* Caching.
 
* Owner-Draw cells (with the possibility of having different heights).
 
* Filtering.
 
 
==Assert==
 
 
==Glyph Libraries==
 
This Would allow a developer to re-use sets of glyphs cross-project
 
 
==ClientDataSet==
 
Improvements on ClientDataSets.
 
 
 
==Platform/Version Independent DCUs==
 
Delphi Compiled units have always been a problem, the use of a tagged (like xml or tiff) or database-like format would allow changes to the format without affecting compatibility.
 
 
==Intelligent Uses==
 
Units that are not really used in the Uses of a Unit should be automatically removed unless a special {$USE} is present (for dynamic use).
 
 
 
==Win64==
 
Native 64bit compiler.
 
== Compact Framework ==
 
Direct Support in the IDE.
 
==.Net 2.0 and 3.0==
 
 
==Linux==
 
The ability to compile server-side Linux stuff would be a great addition, no need for a new Kylix for now, but allow Windows Developers to cross-compile Linux Apache Modules, CGI, Webservices, Daemons (Indy?).
 
 
==Intel Mac==
 
Intel Macs should be easier to deal with than PowerPC ones, but this needs to be a full client (with full mac-like features) as well as server stuff.
 
 
==Single Sourcing==
 
This could be implemented as a special platform, where the lowest common denominator of .Net and Win32/Win64 is allowed, this allows to target a specific platform at compile time (even compile multiple platforms in a *Build*).
 
 
==Profiler==
 
 
==ECO for Win32/Win64/Linux==
 
 
==Multiple Screen Support in the IDE==
 
 
==Delphi's Help==
 
Only Show help topics for the current language and platform, When a project is Delphi/Win32, disable the .Net Help and C++/C# ...etc, also a better help engine, probably built with Delphi.... the one with Delphi 2006 is too slow. Maybe Lucene and HTML? how about a wiki (only when you're online, and the user must be able to disable it, see http://www.php.net/ , http://www.php.net/preg_replace for inspiration)
 
 
==Help==
 
Integrating a Help System in Delphi would be nice, targeting, WinHelp, CHM, HTML, and printed docs.
 
 
 
 
==Dreams==
 
These are probably not viable:
 
===Distributed===
 
this should run in a cluster (MPI/PVM/????) as in
 
procedure DoSomethingInACluster (AString:String;AnInteger:Integer); async; distributed;
 
 
or even:
 
var a:Array of String;
 
 
function MapSomething(DocID:Array of Integer):Array of String;
 
function ReduceSomething(Maps:Array of String):Array of String;
 
 
a:=ReduceSomething(MapSomething([1..1000000]));
 
 
==New IntraWeb-like Ajax==
 
A new intraweb-like ajax interface, every form becomes an html page, that communicates with the server (AJAX) to do all it's work, this would use normal Delphi Symatics to program:
 
 
procedure Button1Click(Sender:TObject);
 
begin
 
Label1.Caption:=Edit1.Text;
 
end;
 

Latest revision as of 14:55, 6 November 2006

The official way to report bugs and file feature requests is through CodeGear's Quality Central. The ideas presented in this wiki are for discussion purposes. Where applicable, links to QC reports will be provided in the hopes that the community will vote for changes/additions to Delphi.

These are things the next version of Delphi could include. These are pointers for Nick and the team. Many of these were comments from Delphi users on Borland Newsgroups and Personal Weblogs.