Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-10

Re: fpc-devel Digest, Vol 40, Issue 15

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

L
Daniel wrote 5 lines
Basically, 2/3 of this unit is duplicated functionality. Interresting functions I cannot get somewhere else are string and path manipulation routines like extractfile*, trim*, wraptext.

Yes.. it duplicates functionality because it was a prototype or proof in concept. I planned to wrap those functions like you say. There are also some functions in StrUtils which rely on sysutils that can be pulled out quite likely.. I've pulled some out already in CompactStrUtils as a proof in concept.

So the sysutils unit, can be arranged in a way that it wraps the ExtractFilePath and friends. We will store those functions in a separate unit together, or an include file. I need to know what you think is better.. an include file or a unit that is put in uses clause. This unit that contains extractfilepath and friends can be put in the uses clause of sysutils, and then can be put into another unit called something like compactsysutils. That name is too long.. what should we call the unit?

L505

Reply by email

Daniël Mantione
to L

Op Mon, 15 Oct 2007, schreef L:

Show quoted text 20 lines
Daniel Wrote: > > Basically, 2/3 of this unit is duplicated functionality. Interresting > functions I cannot get somewhere else are string and path manipulation > routines like extractfile*, trim*, wraptext. > Yes.. it duplicates functionality because it was a prototype or proof in concept. I planned to wrap those functions like you say. There are also some functions in StrUtils which rely on sysutils that can be pulled out quite likely.. I've pulled some out already in CompactStrUtils as a proof in concept. So the sysutils unit, can be arranged in a way that it wraps the ExtractFilePath and friends. We will store those functions in a separate unit together, or an include file. I need to know what you think is better.. an include file or a unit that is put in uses clause. This unit that contains extractfilepath and friends can be put in the uses clause of sysutils, and then can be put into another unit called something like compactsysutils. That name is too long.. what should we call the unit?

Let's first discuss a plan, then we'll see about the name. Suppose we put everything that does something with paths and files in a unit:

* Extractfilepath and friends
* Exec, findfirst, etc.

... then it could be called something like fsutils, "fs" from filesystem.

So, let's first discuss the purpose of the unit and which functions types will be in it.

Daniël

Reply by email

Michael Van Canneyt
to Daniël Mantione
Daniël Mantione wrote 35 lines
Op Mon, 15 Oct 2007, schreef L: > Daniel Wrote: > > > > Basically, 2/3 of this unit is duplicated functionality. Interresting > > functions I cannot get somewhere else are string and path manipulation > > routines like extractfile*, trim*, wraptext. > > > > Yes.. it duplicates functionality because it was a prototype or proof in > concept. I planned to wrap those functions like you say. There are also > some functions in StrUtils which rely on sysutils that can be pulled out > quite likely.. I've pulled some out already in CompactStrUtils as a proof > in concept. > > So the sysutils unit, can be arranged in a way that it wraps the ExtractFilePath > and friends. We will store those functions in a separate unit together, or an > include file. I need to know what you think is better.. an include file or a > unit that is put in uses clause. This unit that contains extractfilepath and > friends can be put in the uses clause of sysutils, and then can be put into > another unit called something like compactsysutils. That name is too long.. what > should we call the unit? Let's first discuss a plan, then we'll see about the name. Suppose we put everything that does something with paths and files in a unit: * Extractfilepath and friends * Exec, findfirst, etc. ... then it could be called something like fsutils, "fs" from filesystem. So, let's first discuss the purpose of the unit and which functions types will be in it.

A small remark before you get too excited:

Sysutils has a fixed interface, for Delphi compatibility. Therefor it does not tolerate changes to the interface. If you move the implementation to another unit, the risk exists that someone "optimizes the interface" and thereby breaks Delphi compatibility. This should be avoided at all cost.

Michael.

Reply by email