Would Lcl be better if it was in D?

Taylor Hillegeist via Digitalmars-d digitalmars-d at puremagic.com
Sun Mar 1 14:40:28 PST 2015

On Sunday, 1 March 2015 at 21:39:08 UTC, Mike James wrote:
> On Sunday, 1 March 2015 at 20:41:30 UTC, Taylor Hillegeist 
> wrote:
>> So I was using the Lazarus IDE the other day, and i thought to 
>> myself, what if i create an application with only a button in 
>> it. well it was easy enough to do. but behold I saw the 
>> executable and it was 14 MB, and I said 'well damn.' It seems 
>> to me that pascal does not do lazy inclusion when it comes to 
>> components of Lcl apart from pre-compiler directives.
>> I noticed some includes in d are inside of functions.
>> void foo() {
>> import thingIneed:subfoo;
>> subfoo();
>> }
>> would this allow people to use a large library like LCL but 
>> with much smaller executables?
> Turn off the debug build - it's then only a few meg...
> -<Mike>-
Yes, the debug does help quite a lot. I like the idea of LCL one 
widget front end so you don't have to worry as much about 
deployment. but i haven't found a good all static cross platform 
solution for d.

so far my favorite GUI libraries so far are:

xwt: mono
LCL: Object Pascal

I like the write once compile anywhere of Lazarus. And I think it 
makes more sense to target the platforms native widget library 
than to force users to install one or package the whole library 
with your executable.

But still the question was about smaller executable when 
compiling d code. The linker needs to know which .o files to 
include, the pascal notation is basically:

  thisBigoleThing, ThisOtherBigOleThing, AndMeToo;

I assume the linker just auto-magically includes the entire thing 
even if your only using a single function or value from each. 
Then again perhaps I am wrong.

More information about the Digitalmars-d mailing list