Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> wrote:In every such endeavour, you can work at a small scale or on a big, industrial scale.It is suitable for a vast number of programs. I'm sure it could be usedThere are _many_ possible organizations. Rather typical is one
for multi-developer projects too. After all, don't your projects also
place all project-structure info into /one/ makefile? Which developer
has editing rights on that file?
Makefile _per directory_. Most 'make'-s seem to be able to do
file inclusion, so you may have a single main Makefile that
includes whatever pieces are necessary. For example, if somebody
wanted to add support for your language to gcc, that would need
creating a subdirectory and putting file called 'Make-lang.in'
inside. Make-lang.in is essentially Makefile for your language,
but it is processed to substitute crucial variable and included
as part of gcc Makefile. Of course, you will need more, but
this covers Makefile part.
Who decides what the modules are going to be? If one developer decidedIn open source project normal thing is a patch or a Git pull
they need a new module, what is the procedure to get that added to the
makefile?
request. This specifies _all_ needed changes, including Makefile-s
if there is a need for new module it gets added where needed.
I one "my" project there can be multiple module in a file, so
a new module may go to existing file (if it is closely related
to other module in the file) or to a separate file. I also needs
changes to Makefile.
The above is technical part. Other is governace of a project.
If there are multiple developers, then there may be some form
of review.
No, there is only C at that level that is mainstream. My point is that there is still a strong need for such a language, but the only practical choice for most people is C.The design IS better in 100 ways, at least compared to C. Other modern,Hmm, the only language at C level that I know and is popular
higher level languages have 100 things I don't have, don't understand,
or would find impossible to use.
>
However a language at the level of C still appears to be extremely
popular. I guess people like something that is not so intimidating and
that they can feel in command of.
is C. Ada, COBOL, Fortran, Modula 2, Pascal, PL/I are languages
that I consider to be at level similar to C. But AFAIK no of them
is really popular and in modern time they aim to be higher-level
than C. Forth is at lower level and really not that popular.
Can you name a language that is at level of C, is popular and
is not C?
My interfaces occur between programs. Then I do have modules that do exactly that. For example I have a module called mclib.m that contains stuff like this:The alternative is to have 50 modules of a project, where each moduleYou discard posibility of re-export. Lazy programmer may write
contains its own subset of 0 to 49 imports. That's up to 950 possible
imports to maintain across up to 50 files. It sounds a maintenance
nightmare. A dependency graph would need a pretty big sheet of paper!
"utility" module that imports every needed interface and re-exports
it. And then in each implementation import this single module.
And yes, import statements need maintenance, IME it was not aA module scheme simply needs to work. Given that C has no such scheme at all, then pretty much anything is an improvement. My current version (probably the fourth major overhaul since the 1980s), works fine all my projects.
problem as import statements were small part of source. Normally
I would import a module if I need to use at least twice something
from the module and usually number of uses were higher.
And module import tended to change slower than normal code.
The only Pascal I used had no modules at all that I remember. All programs had to be one giant source file. (I remember seeing the source for the Pascal compiler for PDP10, as a 2-3"-thick listing of green-lined printout.)Would it even allow mutual imports? If not then that's anotherOne can do better than Turbo Pascal or Modula 2. But IME both
nightmare, which is likely to generate lots of extra dummy modules which
only exist to get around the restriction.
>
I'm sorry, but I tried such a scheme, and decided it was awful.
had quite resonable module systems.
instead of separtate interface text just mark exported things.I find Wirth languages now too opinionated, and too strict for my style of coding.
But explictit imports, more precisely programmer ability to
restrict imports only to those which are explicitely specified
is essential.
Turbo Pascal and I think also Modula 2 distinguish import inThis is exactly what I mean. I had such a scheme too, but I also retained the ability to have manual declarations that cut across the hierarchy. This was when I still used independent compilation of modules.
interface form import in implementation. Imports in interface
part must form a tree (no cycles allowed).
Imports inThe problem was this, for independent compilation:
implementation part allow arbitrary dependencies. One could
allow weaker restrictions, for example during compilation you
may allow patially defined things and only require that there
are no cycles when you try to fill needed information.
For example module A could define a type depending on constant
from module B and module B could define a type depending on
module A.
Les messages affichés proviennent d'usenet.