Re: Portable Software (was: fledgling assembler programmer)

arnold@freefriends.org (Aharon Robbins)
28 Mar 2023 14:42:18 GMT

          From comp.compilers

Related articles
fledgling assembler programmer Alan.Beck@darkrealms.ca (2023-03-21)
Re: fledgling assembler programmer DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-03-25)
Re: fledgling assembler programmer gneuner2@comcast.net (George Neuner) (2023-03-25)
Portable Software (was: fledgling assembler programmer) DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-03-28)
Re: Portable Software (was: fledgling assembler programmer) arnold@freefriends.org (2023-03-28)
Re: Portable Software (was: fledgling assembler programmer) gah4@u.washington.edu (gah4) (2023-03-28)
Re: Portable Software (was: fledgling assembler programmer) gneuner2@comcast.net (George Neuner) (2023-03-28)
Re: Portable Software (was: fledgling assembler programmer) gah4@u.washington.edu (gah4) (2023-03-29)
Re: Portable Software (was: fledgling assembler programmer) 864-117-4973@kylheku.com (Kaz Kylheku) (2023-03-29)
Re: Portable Software (was: fledgling assembler programmer) tkoenig@netcologne.de (Thomas Koenig) (2023-03-31)
Re: Portable Software DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-03-31)
[8 later articles]
| List of all articles for this month |
From: arnold@freefriends.org (Aharon Robbins)
Newsgroups: comp.compilers
Date: 28 Mar 2023 14:42:18 GMT
Organization: non
References: 23-03-001 23-03-017 23-03-022 23-03-029
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="71395"; mail-complaints-to="abuse@iecc.com"
Keywords: tools
Posted-Date: 29 Mar 2023 04:46:09 EDT
Originator: arnold@freefriends.org (Aharon Robbins)



In article 23-03-029,
Hans-Peter Diettrich <DrDiettrich1@netscape.net> wrote:
>My impression was that the FSF favors C and ./configure for "portable"
>code.


Like many things, this is the result of evolution. Autoconf is well
over 20 years old, and when it was created the ISO C and POSIX standards
had not yet spread throughout the Unix/Windows/macOS world. It and the
rest of the autotools solved a real problem.


Today, the C and C++ worlds are easier to program in, but it's still
not perfect and I don't think I'd want to do without the autotools.
Particularly for the less POSIX-y systems, like MinGW and OpenVMS.


>Can somebody shed some light on the current practice of writing portable
>C/C++ software, or any other compiled language, that (hopefully) does
>not require additional human work before or after compilation for a
>specific target platform?


Well, take a look at Go. The trend there (as in the Python, Java and
C# worlds) is to significantly beef up the standard libraries. Go
has regular expressions, networking, file system, process and all kinds
of other stuff in its libraries, all things that regular old C and C++ code
often has to (or had to) hand-roll. That makes it a lot easier for
someone to just write the code to get their job done, as well as
providing for uniformity across both operating systems and applications
written in Go.


Go goes one step further, even. Following the Plan 9 example, the
golang.org Go compilers are also cross compilers. I can build a Linux
x86_64 executable on my macOS system just by setting some environment
variables when running 'go build'. Really nice.


The "go" tool itself also takes over a lot of the manual labor, such
as downloading libraries from the internet, managing build dependencies
(no need for "make") and much more. I suspect that that is also a
trend.


Does that answer your question?


Arnold



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.