Re: [fpc-pascal] What's a unit?

2013-03-09 Thread 印場 乃亜
Hi, On 2013/02/19, at 22:53, Marco van de Voort wrote: > In our previous episode, Mark Morgan Lloyd said: >> Does a unit- rather than something it contains- have any sort of >> representation which is recognisably distinct from an object? > > Maybe. But what it certain doesn't have is a runtime

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Mark Morgan Lloyd
Sven Barth wrote: On 19.02.2013 18:08, Mark Morgan Lloyd wrote: Sven Barth wrote: Thanks Sven, looks interesting and I'll play with it presently. Can an extended record's fields/methods be set up at compilation time, or do they need to be done by code? The example I've given was for the cas

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Sven Barth
On 19.02.2013 18:08, Mark Morgan Lloyd wrote: Sven Barth wrote: Thanks Sven, looks interesting and I'll play with it presently. Can an extended record's fields/methods be set up at compilation time, or do they need to be done by code? The example I've given was for the case that you load the

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Mark Morgan Lloyd
Sven Barth wrote: Thanks Sven, looks interesting and I'll play with it presently. Can an extended record's fields/methods be set up at compilation time, or do they need to be done by code? The example I've given was for the case that you load the functions dynamically and use the procvars co

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Sven Barth
On 19.02.2013 17:49, Mark Morgan Lloyd wrote: Sven Barth wrote: OK, so is it possible to set up a constant extended record (i.e. the work being done entirely at compilation time) that mimics an instantiated object? Would if LibCapShim is TObject then .. be safe where LibCapShim could be eithe

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Mark Morgan Lloyd
Sven Barth wrote: OK, so is it possible to set up a constant extended record (i.e. the work being done entirely at compilation time) that mimics an instantiated object? Would if LibCapShim is TObject then .. be safe where LibCapShim could be either an object (possibly nil) or a constant extend

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Sven Barth
On 19.02.2013 15:18, Mark Morgan Lloyd wrote: Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Does a unit- rather than something it contains- have any sort of representation which is recognisably distinct from an object? Maybe. But what it certain doesn't have is a

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Mark Morgan Lloyd
ik wrote: On Tue, Feb 19, 2013 at 3:31 PM, Mark Morgan Lloyd wrote: Does a unit- rather than something it contains- have any sort of representation which is recognisably distinct from an object? I've got a situation where if a library (.dll or .so) is opened under program control it is represe

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Does a unit- rather than something it contains- have any sort of representation which is recognisably distinct from an object? Maybe. But what it certain doesn't have is a runtime instance. unit is mostly a compiletime

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > Does a unit- rather than something it contains- have any sort of > representation which is recognisably distinct from an object? Maybe. But what it certain doesn't have is a runtime instance. unit is mostly a compiletime concept, and the Delphi e

Re: [fpc-pascal] What's a unit?

2013-02-19 Thread ik
On Tue, Feb 19, 2013 at 3:31 PM, Mark Morgan Lloyd wrote: > Does a unit- rather than something it contains- have any sort of > representation which is recognisably distinct from an object? > > I've got a situation where if a library (.dll or .so) is opened under > program control it is represented

[fpc-pascal] What's a unit?

2013-02-19 Thread Mark Morgan Lloyd
Does a unit- rather than something it contains- have any sort of representation which is recognisably distinct from an object? I've got a situation where if a library (.dll or .so) is opened under program control it is represented by an object, with entry points expressed as methods. Alternati