Difference in the use of packages in Delphi / Lazarus and in Java

1

I would like to know the difference in the use of packages in Java projects for the use of packages in Delphi / Lazarus projects?

In Java I know what it's all about separating the classes into folders, where the existence of the same within that context makes sense.  But in Delphi / Lazarus I found some mixed opinions where in some places they said that the packages would be like reusable modules besides some places nor show the use of them, I would like to know the opinion of someone who knows of the 2 worlds.

    
asked by anonymous 26.10.2017 / 16:26

2 answers

0

In Java your concept is correct. In Delphi the use of packages or Packages serves more specifically to modularize a system. However, class organization can be done in these packages just as it does in Java. Always remembering that you can work with Object Orientation in Delphi just like in Java . Unfortunately many Delphians use the tool in the wrong way (procedural only), and this ends up belittling the image of Delphi and good Delphian . There are several benefits to using packages in Delphi .
See here .

    
26.10.2017 / 17:25
1

Actually, in Delphi packages are usually designed to be reused. Packages are treated as a framework.

This does not mean that you can not modularize your system using packages if you wish. But if you want to separate classes and modules, you do not need to create a package. You can do this by using Unit Scope Names and Unit Namespaces .

Note that the operation is a little different .

    
27.10.2017 / 21:14