octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57587] Should symlinks follow physical struct


From: Lars Kindermann
Subject: [Octave-bug-tracker] [bug #57587] Should symlinks follow physical structure or logical structure?
Date: Mon, 13 Jan 2020 17:21:31 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

Follow-up Comment #6, bug #57587 (project octave):

It seems that several projects who developed scripts or interpreters had this
discussion at some point. To summarize some typical arguments for and against
symbolic path tracking (bash style) vs. automatic canonicalizing to physical
paths (csh style): 
 
Bash style seems more logical and less surprising for the user.
cd 'xyz' and cd '..' are always symmetric, inverse operations. Code always
works identically for real subdirs and symlinks.

It's not easy to implement. There is no system API for this availabe. Like in
Bash, a complex tracking logic must be implemented in the interpreter itself,
with many possible pitfalls.

If symbolic tracking is the default implemented behaviour, it is very easy for
the user to code the physical behaviour if desired: 

cd(canonicalize_file_name(path)) 
cd(canonicalize_file_name('..')) 
pwd(canonicalize_file_name('.'))

The other way round, if not implemented in the interpreter, there is no easy
method to stay in the symbolic namespace, the user has to code all the complex
tracking logic himself.

But in fact, most interpreters finally stayed with the standard API calls, aka
csh style...

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57587>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]