this post was submitted on 03 May 2024
13 points (64.4% liked)

Linux

48254 readers
482 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I know that there are ten different alternatives. Why don't we simply improve the basic stuff?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 15 points 6 months ago (1 children)

Yeah, for this reason, lots of full-fledged programming languages actually make you specify the arguments as a list of strings directly, so for example:

Command::new("cp")
    .args(["file 1", "file 2”])
[–] [email protected] 17 points 6 months ago

It's a subset of the standard delimiter problem: if I want to use the delimiter inside of an entry, can I even do that and if so then how?

e.g. in comma-delimited lists you could "escape" the commas individually, or encapsulate each entry inside quotes, or provide each entry by name, etc. - all of which significantly complicates the retrieval process by adding greater complexity to decide on rules determining how it all works (like if by name, then what if the user [stupidly? on purpose?] provides multiple entries with the same name - do subsequent ones overwrite the earlier ones or their contents get appended to the end and if the latter, is any separation provided between them? and on and on it goes):

  • item1,item2,item3
  • "Denver, CO","New York, NY",Miami/, FL
  • "Lastname, Firstname",Lastname/, Firstname
  • item1="Denver, CO", item2="New York, NY"

Common English has issues with this too like is a list with "John, Marsha, Barbie and Ken" 4 entries or just 3 where the latter is a pairing? (leading to Oxford comma discussion:-P it is very important though bc while while individual people may have similar needs like food, pairings may have different constraints like if they drive together then they need less parking space)

So this delimiter issue is not even specific to CLIs, nor even computers in general - it is a universal problem with any communication system.