Sign in Join
Wiki copytemporary

Feature Ideas

Warning: This page is intended to collect ideas for features that could be included in FPC/Lazarus. Putting an idea here does not mean it WILL be put into FPC/Lazarus. It's just a place to gather ideas. Think of this as more of a wishlist.

If it is clear who is going to implement the feature, for example, because you have a patch or somebody on the mailing list volunteered to implement it, then it can be added to the FPC/Lazarus Bugtracker, so it can be tracked and scheduled for a release.

If you really want to see a feature implemented urgently, have a look at Bounties to pay for development.

Tags: Wish, Wishes, Wishlist

IDE

Features that could be included in the IDE

An Integrated IDE

(Partly) done in 0.9.29: see Anchor Docking

Warning: There are known bugs in the docking implementation. The Lazarus developers are aware of these and will be working on them if time permits. If you want to help speed this up by providing code, please get in touch on the Lazarus mailing list

There are too many windows in the IDE. The more features you use the more they pile up on your desktop and become hidden behind other windows. This is confusing for the newbie and otherwise a mess. Docking windows as found in some IDEs might seem to give flexibility however in practice it is a two dimensional solution. You accidentally undock a window and have it hanging on your mouse while you try to put it back where it was. It would be better to use conventional splitters and tab controls to put it all together into a logical layout.

:* a. Code tab including Code Explorer, Source Editor and Project Manager

:* b. Form design tab including Object Inspector, Form designer and Component Palette

:* a. Probably a view concept is needed (different layout in debug then in normal (debug)). Maybe differentiate dependning on the F12 state (designer visible) too.

:* b. Big missing feature is the ability to let tabs page in from the side (a tab system to the left and right from the screen, ideal for process manager). When such tab loses focus, it pops back.

Auto-generated database form

If you have set up a TSQLQuery, it would be nice to be able to let the IDE autogenerate a from with appropriate controls for all fields. --BigChimp 16:39, 8 August 2014 (CEST)

Easier Dragging & Dropping

Ideas that have been implemented

Done in 0.9.29: Options / Form editor / Ask name on create pool: after you add a component at Form, what is your next action? Editing Name/Caption in OI. Would be nice having OI focused and a key field like Name/Caption/Text selected. It would be very intuitive just having to type after dropping the component.

Common

example: <alt>-<f> for file menu. Question: what operating system/widget set are you talking about?

Ideas that have been implemented

Source Editor

A good example is Qt Creator: you press Alt+V+V and get into FakeVim mode, where most vim commands work

Question: what do you mean by keyboard? Another keyboard layout? Different shortcuts keys? Shortcut keys can already be defined via the Tools menu

Ideas that have been implemented

some code {% /* } <-- start folding 
 more code
 ...
 ...
and more code {% */ } <-- stop folding 

QUESTION: Does that refer to the "highlight all occurrences" of "word under caret"/"current selection"?

That is possible (try alt-M)

Improvement of the menu and toolbars

Integrated and Working Debugger

Debugging from inside the IDE can be a frustrating process. I believe this is a combination of GDB being more C/C++ centric, or because it is a more generalized standalone debugger. Either way, I think the ultimate solution is to write a custom debugger for use with FPC and Lazarus IDE. This way it will be possible for the debugger to support ALL Object Pascal and Lazarus IDE requirements, or maybe even be compiled into the Lazarus IDE itself. GDB does support Object Pascal, but not nearly at the level it does with C/C++.

An IDE without sufficient debugging support is a hard sell to would-be contributors or Delphi converts. This might also have contributed to some of the negative comments received in the Delphi non-technical newsgroup. Make no mistake, I love the many unique IDE features Lazarus has to offer - it beats Delphi IDE by far.

Apart from the standard Lazarus debugging solution using gdb there are multiplle custom written debuggers, partly or completely implemented in Object Pascal:

Please try out these projects and contribute if you can.

Object Inspector

Search field

add a "search" text box at the top or bottom (preferred, maybe user settable) of Object Inspector to be able to search for a name or value (maybe with right click menu checkable options on whether Name or Value or both are searched) in the properties/events list

Question: What about sub properties?

Recent page

add a "Recent" tab to Object Inspector apart from the "Favorites" one, would be more useful than the Favorites one since it's automatic (would keep all properties/events that have been edited [fields that have either been changed or ENTER was pressed to CONFIRM/REset their current value - focus lost events shouldn't be considered editing if value of property/event field didn't change])

Question: How are items removed from the list?

Not registered component classes

Add a field in the object inspector to allow specifying the real class that will be instantiated, with that will allow to uses derived classes without remake/link the IDE, of course the new fields for the real class will not be available to edit in designer. An example: We place a TEdit in a form, but we want to use a derived class we made that add a new field/property/method to TEdit and we will use that new field/property/method programming but in design time it's enough to work with TEdit, actually there is an option to change the class but only to another one that's already linked on the IDE.

Note: The class must be registered. This is needed for streaming and RTTI. If you don't want to register the real class, then register a fake class. It would be possible to create an artificial derived class from a registered component class on the fly. This has nothing to do with the OI. A dialog to manage all artificial classes must be implemented and a menu item must be added somewhere.

Refactoring

Global Variable/Method renaming

Proper renaming (as in if I rename a field in an object it can change everything that uses it but NOT other stuff that happens to have the same name) -Plugwash

Already implemented: See Source Editor -> popup menu -> refactoring -> rename identifier

Parameter Renaming in Methods

adding a parameter to a method (and updating everything that uses it) -Plugwash

How should that work? What should the IDE/codetools put as parameter at the places?

You specify that when you ask for the parameter to be added. Plugwash 05:09, 30 September 2006 (CEST)

For example, you add a parameter "b: boolean". The method is used a 100 times.

Do you have 3 in mind or 4?

Parameter reordering

like Delphi. A dialog to add, remove, reorder parameters of a function, method, property.

Improvement of the IDE like GExperts does for Delphi

Question: please indicate what you specifically miss in Tools/Editor/General/Tab and Indent

I have a dream of components : Jedi

Sure I switch immediately from Delphi to Lazarus.

Code completion

Create/Free objects

Declare an object myObj:TMyClass into a TForm class an type some Ctrl-Shift-Key, then the IDE adds a line myObj:=TMyClass.Create in FormCreate and myObj.Free in FormDestroy. -Rednaxel

Add list properties

Declaring an indexed property like 'property Items[i: integer]: TAType' and using this feature (Ctrl-Shift-Key, Menu), should popup a dialog to setup some parameters and then it should add a private variable fItems: TFPList; (or 'array of' or TList or ^AType), create code in the constructor, destroy code in the destructor and access methods GetItems, SetItems.

Visual Form Inheritance

VFI (Visual From Inheritance) works in Lazarus but there are some missing features:

Conditional Compiler Options

See Conditional Compiler Options.

Help

A small tutorial for Object Oriented Programming

I wish to have in Lazarus as in Eclipse in the Help menu a Tutorial for Object Oriented Programming.

Better Macro support by making them easier to find

See the feature request #14558 in Mantis. In summary, add a button next to EditBox controls which support macro usage. Clicking the button will display a popup menu with available macros at that level and insert the selected macro into the EditBox at the cursor position.

Copy and Paste Support for a lazy programmer (in properties-editor)

Maybe it's by design (because of the same behaviour under win and mac)... but I think, it's a little bit of annoying. When I try to copy the chosen "name" of a component out of proterties-editor by selecting it and ctrl+c, I will not get the text of the name, but the object/component description itself (which is useless, I guess). There is not even a "copy" item in the context-menu. I use very long descriptive names for components (and variables) and it would be nice, to get these unhandy names somehow into the clipboard. KaLi 14:56, 30 June 2010 (CEST)

This seems to work in 0.9.31, both Ctrl+C and via context-menu Bart

Code Library Window or Tab

It would be great to have a built in location to store all those useful pieces of code. Ones that you have created, or found useful.

My ideal feature list would be:

It would also be a good place to help people who need some assistance. I would have the following options:

The "Code Librarian" third party code library tool is available made by Lazarus forum user taazz. Helping him with incorporating these features (if he wants to) could be the best way of getting this functionality: http://forum.lazarus.freepascal.org/index.php/topic,22752.0.html and https://sourceforge.net/projects/codelibrarian/

Write and run unit tests from subpackage of project being tested

The main idea is to have ability to write and run Unit tests from a subpackage of main project. Please see Feature Ideas/UnitTests

LCL

Components

Components that are possible to make that will work across all platforms supported by Lazarus

Visual

NonVisual

PDA Support

Something that currently does not exist is a complete multiplatform solution for PDAs. If we can implement this, Lazarus will become the first multiplatform RAD for PDAs ever created. Some devices work with Java, some work with c++ and Qtopia, some work with their particular APIs, there is no single solution currently that can embrace a large portion of PDAs. Application have to be redone for every PDA or simply just run on one of them (what most people do).

The LCL implements many things. It is not necessary to implement them all to have a reasonably working Lazarus PDA widgetset. The most important things to be implementeded for PDAs are:

Others can be easily implemented by people who need them after those are ready.

Here is a list of some PDAs and the status of their support on Free Pascal / Lazarus:

PalmOS 6 Cobalt is fully arm, so it only requires a rtl, but it has zero devices working on it currently and won't be on the market until 2007 at least.

Other compilers that support this target: Pascal & Palm Compiler and HsPascal. Unfortunately those compilers are not open source, so we can't use their code, we need to implement PalmOS RTL from zero.

More Interfaces

improved EventQueue

Lua

Visual Improvements

An idea for a splash screen

The font for "write once..." is DejaVue Serif Condensed, for "Lazarus" is Phantom, and for "object pascal" is Tahoma.

If you want to change the splash logo on Windows, in your main Lazarus installation folder find "images" folder and there find "splash_logo.bat". Then edit and run it or replace "splash_logo.png" and run "splash_logo.bat".

critique

FPC

Per-type Byte Alignment

A means to align variables and records in a unit is already possible with compiler directives, but is somewhat messy and might cause conflicts in some situations. What I propose is an addition to the Free Pascal syntax that forces all variables of a defined type to be aligned to a particular boundary. e.g.

pascal
  type
    AlignedDouble = Double align 16;

  type
    TVector4f = packed record
      X, Y, Z, W: Single;
    end align 16;

  type
    TVector4fArray = array of TVector4f align 32;
  { tighter restrictions than TVector4f, so it's okay. Note that this should probably align Var[0] to a 32-byte boundary, not necessarily Var as a whole }

Such aligned types are useful and even necessary for when working with SSE and AVX, where significant speed gains can be achieved with aligned data (and some operations require it).

Apparently Delphi supports something like this already, but it isn't well-documented.

Nuances

CuriousKit (talk) 18:28, 5 December 2017 (CET)

"vectorcall;" modifier for Win32 and Win64

This function modifier is the only unique modifier for Win64 (although it can be used in Win32 too), introduced by Microsoft at the behest of game developers who wish to reduce the overhead of passing vectors and the like into subroutines. The basic details are the same as the regular Win64 calling convention, but attempt to vectorise certain record types and pass them in their entirety through a single XMM register (something which is already possible in Linux64 sometimes). Details can be found here: https://msdn.microsoft.com/en-us/library/dn375768.aspx

This may require the byte alignment feature described above.

vectorcall is implemented in (the upcoming) fpc 3.2 for the win64 platform. Bart

Nuances

CuriousKit (talk) 23:04, 5 December 2017 (CET)

"default"-value in a proc or function call

pascal
program DefaultParameter;
 
{$mode objfpc}{$H+}
 
type
   Pilots = (Charles, Amelia, Belly, Louis);
 
procedure Fly(Pilot: Pilots = Belly; Copilot: Pilots = Charles);
begin
  if (Pilot=Copilot) then
   halt(1);
end;
 
begin
   Fly; // we fly with Belly+Charles
   Fly(); // we fly with Belly+Charles
   Fly(Amelia); // we fly with Amelia+Charles
   Fly(Louis, Belly); 
 
   // The following "default" is my Feature Idea
   //  │
   //  v
   Fly(default, Amelia); // we fly with Belly+Amelia
end.

Critique

"pure;" function directive

I propose a new directive keyword that can be specified for functions, named pure. Its intention is to act as a hint to the compiler that the function is fully self-contained, has no side-effects (although the compiler will actually check if this is the case) and is guaranteed to return the same output for a given input. An example would be the Int function, which returns the input value with the fractional part stripped off, and nothing else.

So what would be the advantage of a function being 'pure'? With a pure function, if the input values are constants, then the output(s) will also be constants, hence they can be pre-calculated during compilation and the function call completely replaced with an assignment, offering a massive speed boost and providing a sort of general-purpose means of doing what some internal compiler routines do in regards to replacing calls with static values.

There are potentially two ways that the compiler can determine if a function is pure:

In this case, the pure keyword gives a hint to the compiler as to which procedures to check for purity, so it doesn't waste a potentially long time on routines that the programmer already knows are impure.

If a function is marked as pure but it turns out not to be, the compiler throws a warning much like what happens if it's marked as inline, but something makes it an invalid candidate. The following paradigms would make a function a non-eligible candidate:

There are probably other things that prevent a function from being pure.

pure will generally only be used on functions; procedure is nevertheless valid because the output may be an out parameter, so long as the procedure's body follows all of the rules of a pure function.

Nuances

CuriousKit (talk) 01:20, 17 June 2018 (CEST)

Support for Traits

As a user who never got warm with the concept of interfaces, I'd like to suggest support for traits 2.

Support for Promises

I know there are TThread.ExecuteInThread, Synchronize, Queue, etc. But JavaScript's promises 3 are so intuitively to use that I'd love to see support in FPC. Could be an enormously handy feature when dealing with tasks for which, on the one hand, TThread would be overdimensioned, but on the other hand, doing the task in the main thread would on the other hand cause lags. I'm especially thinking about web requests, loading data from a file (which could be on a network drive), etc.

Other

Fixes branch releases

Already done: Currently we only have snapshots of the fixes branch, and it would be nice to also have them as releases. To have releases, those builds would have to be tested by someone, so I volunteer for that. What is needed is a testing checklist, and the start of it can be found on my page, User:Arny. Any further ideas are welcome!

See Also


From the Free Pascal wiki, page "Feature Ideas", as it stood on 2022-12-20 after a change by Bart, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 2, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.