Re: question about linker

Liste des GroupesRevenir à cl c  
Sujet : Re: question about linker
De : bc (at) *nospam* freeuk.com (Bart)
Groupes : comp.lang.c
Date : 06. Dec 2024, 19:41:23
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vivggi$2gkth$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
User-Agent : Mozilla Thunderbird
On 06/12/2024 15:41, David Brown wrote:
On 05/12/2024 16:29, Bart wrote:
On 05/12/2024 14:00, David Brown wrote:
On 04/12/2024 22:31, Bart wrote:
>
And while you are at it, buy a better screen.  You were apparently unable to read the bit where I said that /saving typing/ is a pathetic excuse.
>
I can't type. It's not a bad excuse at all. I have also suffered from joint problems. (In the 1980s I was sometimes typing while wearing woolen gloves to lessen the impact. I haven't needed to now; maybe I've slowed down, but I do take more care.)
 Being unable to type, on its own, is not a good excuse - it's an essential skill for productive programmers.

The goal of that last part is to reduce the number of characters you have to type, rather than the number of characters in the source code.
My language:
   println =a,=b                  # 13 characters, 0 shifted
(And that space is optional!) In C (assume the existence of stdio.h):
   printf("A=%lld B=%f\n",a,b);   # ~28 characters, 8 shifted
Enough said.

  If I am writing module X and I want to use symbol "foo" from module Y, then I expect to say explicitly that I am using module Y (via an "import" or "include" statement), and I expect to say explicitly that I want "foo" from module Y (as "Y.foo", "Y::foo", "using Y", "using Y.foo", "from foo import Y", or whatever suits the language).
 When I read a source file in any language, and I see the use of an identifier "foo", I want to know where that came from - I want to be able to find that out without doubt.  If it is written "Y.foo", then there is no doubt.  If I see "using Y.foo", there is no doubt - but I'd
If you used my language, you can type Y.foo if you want. Nothing stops you doing that.
And if you were using it, I can make the ability to omit 'Y.' optional.
However, you'd need to get used to a language and compiler that is 'whole-program', with a slightly different approach

You have snatched defeat from the jaws of victory in order to save a couple of lines at the start of each file - with the result that your language is only suitable for small single-developer programs.
It is suitable for a vast number of programs. I'm sure it could be used 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?
Who decides what the modules are going to be? If one developer decided they need a new module, what is the procedure to get that added to the makefile?

 
So my approach is a little more informal, and more convenient.
 "Informal" is a common theme for your language and your tools.
Small, simple, easy, fast, effortless, informal, minimal dependencies, self-contained implementations. Yes, those are aim. And?
I guess people still use manual screwdrivers instead of power tools? Your tools are magnitudes bigger in scope than a powered screwdriver.
For wiring a plug etc, a power tool is over the top.

  And "convenient" means convenient for you alone, not other people, and certainly not other people working together.
You're guessing.

  I suppose that is reasonable enough since you are the only one using your language and tools - why should you bother making something useful for people who will never use them?  But this is a root cause of why no one thinks your language or your tools would be of any use to them - and why you get so much backlash when you try to claim that they are better than other languages or tools.
The design IS better in 100 ways, at least compared to C. Other modern, 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.
To that end, my language is still relevant. In any case, /I am not pushing my language/ or advocating people to ditch C in favour of it. Such a task would need to be done by someone else. I'm just using as an example of better design, one that as been proven in actual use.
Actually, I get a kick out of using my private languages which fixes nearly everything I find annoying about C.
And when I do write C, I also get a kick out of using my private C compiler, NOT written in C.

Yep. And yet, it is not some obscure, exotic monstrosity. It's not that different from most others, and it's not that hard to understand.
 It /is/ obscure and exotic.
I guess you haven't seen many exotic/esoteric languages.
You once described my syntax as clean and easy to understand; what's changed?

No, it is not.  You set PATH to the directories you want to use for binaries - the OS does not search the entire disk or random additional attached filesystems.
PATH is a collection of paths that are searched in turn. There it will stop at the first match.
That's similar to my list of modules that are searched in turn. There it will find all matches and report an ambiguity if more than one.
However, my list is private to my project, while PATH is common to every command prompt and to whatever directory is current. Some programs could even manipulate the contents of PATH.

No, your design is to /force/ "using namespace" - whether the programmer wants it or not, and without the programmer even identifying the modules to import.  It's your choice - but it's a bad choice.
The programmer knows how the language works. They will have chosen the modules that are grouped together.
The alternative is to have 50 modules of a project, where each module 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!
Would it even allow mutual imports? If not then that's another 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.

No, I'm calling tcc and your compiler "toys".
If something really criticial and imminent depended on your compiling and running some C code, and the only compiler to hand was tcc, then you'd use it! Either that or write some assembly or key in machine code.
Then it's not a toy!
But I'm curious now: would you call any bit of software a toy if it was only written with one client in mind?
Or if it was a highly streamlined and dedicated version of a much larger, more general purpose program?
Do you call the specialist compilers for some of your devices toys because they only support one target (and apparently badly sometimes)?
What about assemblers: would you call a 100KB assembler a toy compared with 1MB or 2MB one? There's not much to assembling: if it does the job, then what would be toyish about it?
How about linkers: I could likely write one in 100KB, which turns a bunch of .o/.obj files into a binary. What that be a toy?
I'm really interested now. Those bigger products will have hundreds of options. So is it having lots of shiny buttons, and lots of things to learn, that would earn your respect, even though the task at hand is pretty trivial?

Date Sujet#  Auteur
26 Nov 24 * question about linker382Thiago Adams
26 Nov 24 +* Re: question about linker16Thiago Adams
26 Nov 24 i`* Re: question about linker15Bart
26 Nov 24 i `* Re: question about linker14Thiago Adams
27 Nov 24 i  +* Re: question about linker2BGB
27 Nov 24 i  i`- Re: question about linker1Bart
27 Nov 24 i  +* Re: question about linker5David Brown
27 Nov 24 i  i`* Re: question about linker4Thiago Adams
27 Nov 24 i  i +* Re: question about linker2David Brown
27 Nov 24 i  i i`- Re: question about linker1Thiago Adams
2 Dec 24 i  i `- Re: question about linker1BGB
27 Nov 24 i  `* Re: question about linker6Michael S
27 Nov 24 i   `* Re: question about linker5Thiago Adams
27 Nov 24 i    `* Re: question about linker4Michael S
27 Nov 24 i     +- Re: question about linker1David Brown
28 Nov 24 i     +- Re: question about linker1Tim Rentsch
2 Dec 24 i     `- Re: question about linker1BGB
26 Nov 24 +* Re: question about linker20Bart
26 Nov 24 i`* Re: question about linker19Thiago Adams
26 Nov 24 i `* Re: question about linker18Bart
27 Nov 24 i  +* Re: question about linker3BGB
27 Nov 24 i  i`* Re: question about linker2fir
27 Nov 24 i  i `- Re: question about linker1BGB
27 Nov 24 i  `* Re: question about linker14Bart
27 Nov 24 i   +* Re: question about linker12Thiago Adams
27 Nov 24 i   i+- Re: question about linker1Thiago Adams
27 Nov 24 i   i`* Re: question about linker10Bart
27 Nov 24 i   i +* Re: question about linker6Bart
27 Nov 24 i   i i`* Re: question about linker5Thiago Adams
27 Nov 24 i   i i +* Re: question about linker3Thiago Adams
27 Nov 24 i   i i i`* Re: question about linker2Thiago Adams
27 Nov 24 i   i i i `- Re: question about linker1Bart
27 Nov 24 i   i i `- Re: question about linker1Bart
27 Nov 24 i   i `* Re: question about linker3Thiago Adams
27 Nov 24 i   i  `* Re: question about linker2Bart
27 Nov 24 i   i   `- Re: question about linker1Thiago Adams
28 Nov 24 i   `- Re: question about linker1Tim Rentsch
27 Nov 24 `* Re: question about linker345Waldek Hebisch
27 Nov 24  `* Re: question about linker344Thiago Adams
28 Nov 24   `* Re: question about linker343Keith Thompson
28 Nov 24    `* Re: question about linker342Thiago Adams
28 Nov 24     +* Re: question about linker337Bart
28 Nov 24     i`* Re: question about linker336Keith Thompson
29 Nov 24     i `* Re: question about linker335Bart
29 Nov 24     i  `* Re: question about linker334Keith Thompson
29 Nov 24     i   `* Re: question about linker333Bart
29 Nov 24     i    +* Re: question about linker3Keith Thompson
29 Nov 24     i    i`* Re: question about linker2Bart
29 Nov 24     i    i `- Re: question about linker1Keith Thompson
29 Nov 24     i    `* Re: question about linker329David Brown
29 Nov 24     i     `* Re: question about linker328Bart
29 Nov 24     i      +- Re: question about linker1Ike Naar
29 Nov 24     i      +* Re: question about linker325Michael S
29 Nov 24     i      i+* Re: question about linker322Bart
29 Nov 24     i      ii`* Re: question about linker321Michael S
29 Nov 24     i      ii +* Re: question about linker319David Brown
29 Nov 24     i      ii i`* Re: question about linker318Bart
29 Nov 24     i      ii i +* Re: question about linker164Keith Thompson
29 Nov 24     i      ii i i`* Re: question about linker163Bart
30 Nov 24     i      ii i i `* Re: question about linker162Keith Thompson
30 Nov 24     i      ii i i  +* Re: question about linker95Waldek Hebisch
30 Nov 24     i      ii i i  i+- Re: question about linker1Keith Thompson
30 Nov 24     i      ii i i  i+* Re: question about linker3James Kuyper
30 Nov 24     i      ii i i  ii`* Re: question about linker2Michael S
3 Dec 24     i      ii i i  ii `- Re: question about linker1Tim Rentsch
1 Dec 24     i      ii i i  i`* Re: question about linker90David Brown
1 Dec 24     i      ii i i  i +* Re: question about linker88Bart
1 Dec 24     i      ii i i  i i`* Re: question about linker87David Brown
1 Dec 24     i      ii i i  i i `* Re: question about linker86Bart
2 Dec 24     i      ii i i  i i  `* Re: question about linker85David Brown
2 Dec 24     i      ii i i  i i   `* Re: question about linker84Bart
2 Dec 24     i      ii i i  i i    +* Re: question about linker78David Brown
2 Dec 24     i      ii i i  i i    i+* Re: question about linker72Janis Papanagnou
2 Dec 24     i      ii i i  i i    ii+* Re: question about linker70Bart
2 Dec 24     i      ii i i  i i    iii+* Re: question about linker68David Brown
2 Dec 24     i      ii i i  i i    iiii`* Re: question about linker67Bart
3 Dec 24     i      ii i i  i i    iiii `* Re: question about linker66David Brown
3 Dec 24     i      ii i i  i i    iiii  +* Re: question about linker53Bart
3 Dec 24     i      ii i i  i i    iiii  i`* Re: question about linker52David Brown
3 Dec 24     i      ii i i  i i    iiii  i `* Re: question about linker51Bart
4 Dec 24     i      ii i i  i i    iiii  i  `* Re: question about linker50David Brown
4 Dec 24     i      ii i i  i i    iiii  i   `* Re: question about linker49Bart
4 Dec 24     i      ii i i  i i    iiii  i    `* Re: question about linker48David Brown
4 Dec 24     i      ii i i  i i    iiii  i     +* Re: question about linker24Bart
5 Dec 24     i      ii i i  i i    iiii  i     i`* Re: question about linker23David Brown
5 Dec 24     i      ii i i  i i    iiii  i     i +- Re: question about linker1Janis Papanagnou
5 Dec 24     i      ii i i  i i    iiii  i     i `* Re: question about linker21Bart
6 Dec 24     i      ii i i  i i    iiii  i     i  `* Re: question about linker20David Brown
6 Dec 24     i      ii i i  i i    iiii  i     i   `* Re: question about linker19Bart
6 Dec 24     i      ii i i  i i    iiii  i     i    +* Re: question about linker5Ike Naar
6 Dec 24     i      ii i i  i i    iiii  i     i    i+- Re: question about linker1Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i+- Re: question about linker1Keith Thompson
7 Dec 24     i      ii i i  i i    iiii  i     i    i`* Re: question about linker2Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i `- Re: question about linker1Keith Thompson
7 Dec 24     i      ii i i  i i    iiii  i     i    +* Re: question about linker10David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i`* Re: question about linker9Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i `* Re: question about linker8David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i  `* Re: question about linker7Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i   `* Re: question about linker6David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i    `* Re: question about linker5Bart
8 Dec 24     i      ii i i  i i    iiii  i     i    i     +* Re: question about linker3Ben Bacarisse
8 Dec 24     i      ii i i  i i    iiii  i     i    i     `- Re: question about linker1David Brown
8 Dec 24     i      ii i i  i i    iiii  i     i    `* Re: question about linker3Waldek Hebisch
5 Dec 24     i      ii i i  i i    iiii  i     +* Re: question about linker15Waldek Hebisch
11 Dec 24     i      ii i i  i i    iiii  i     `* Re: question about linker8James Kuyper
3 Dec 24     i      ii i i  i i    iiii  `* Re: question about linker12Bart
3 Dec 24     i      ii i i  i i    iii`- Re: question about linker1Janis Papanagnou
2 Dec 24     i      ii i i  i i    ii`- Re: question about linker1Bart
2 Dec 24     i      ii i i  i i    i`* Re: question about linker5Bart
4 Dec 24     i      ii i i  i i    `* Re: question about linker5Waldek Hebisch
1 Dec 24     i      ii i i  i `- Re: question about linker1Janis Papanagnou
30 Nov 24     i      ii i i  +* Re: question about linker44Bart
30 Nov 24     i      ii i i  +- Re: question about linker1Janis Papanagnou
1 Dec 24     i      ii i i  `* Re: question about linker21David Brown
30 Nov 24     i      ii i `* Re: question about linker153David Brown
5 Dec 24     i      ii `- Re: question about linker1Tim Rentsch
30 Nov 24     i      i`* Re: question about linker2Tim Rentsch
29 Nov 24     i      `- Re: question about linker1David Brown
28 Nov 24     `* Re: question about linker4Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal