Giter VIP home page Giter VIP logo

Comments (3)

andrewrk avatar andrewrk commented on May 29, 2024 1

One possible solution is to merely document the differences in platform behavior and leave it to the API user to handle the differences appropriately. For example, some of the file system API mentions that atomicity is platform-dependent.

I think the most important concern is 1. making it practical to write optimal software that does the best combination of syscalls on any given OS, closely followed by 2. making it maintainable to do this for all the supported operating systems being abstracted over.

In other words, I would rather solve the problem by pushing the OS differences onto the API user, than do a bunch of work behind the scenes to make one system emulate a different one.

from zig.

squeek502 avatar squeek502 commented on May 29, 2024 1

Agreed, I think that's the most viable path forward for something like this where trying to hammer one platform's behavior to match the shape of another would likely incur a significant 'optimality' penalty in one direction or another. Plus, matching the platform convention for each platform doesn't seem like the worst thing in this case.

Can always revisit this decision later if there's more context that's missing.

from zig.

squeek502 avatar squeek502 commented on May 29, 2024

An additional note: the Linux behavior here matches the behavior of mkdir -p on Linux:

$ ls
$ mkdir -p first/../second/../third
$ ls
first  second  third

So this seems to basically be the same dilemma as #7751 and #4658 (comment)

from zig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.