Squidward Tentacles meme format. Top panel shows Squidward looking happy while setting up a beach chair, with the text 'WANT TO CONTRIBUTE TO AN OPEN SOURCE PROJECT I USE AND APPRECIATE'. Bottom panel shows Squidward looking sad and disappointed, folding up the chair and going back inside a building, with the text 'WRITTEN IN JS'.
you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 11 months ago (3 children)

What you mentioned is compatibility across platforms. A program written in C is also guaranteed to run on all the systems you mentioned, given that the system has a C compiler and libc that stick to the standard. You, the programmer, does not have to anything to "make sure" your program works.

See this insane list of platforms GCC supports.
https://en.wikipedia.org/wiki/GNU_Compiler_Collection#Architectures

We've invented high-level programming languages like C 53 years ago, just to get away from assembly, and to avoid dealing with the "cross-platform" problem you mentioned, remember?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 11 months ago* (2 children)

    What if the system does not have libc? What if your program needs obscure library X?

    Why do you think anyone even came up with the idea of virtual machines? Don't you think they had a problem they wanted to solve, that was not solved adequately before?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 11 months ago (1 child)

    What if the system does not have libc?

    No offence but I think I need to stop discussing with you.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 11 months ago*

    Maybe you should. Android for example does not use glibc and instead uses "Bionic" by default, which only implements a subset of libc.

    It is possible to write a C program that runs on one system but not on another. You can't do that with node, if it runs on the VM and the VM runs in another place, your program will also run there.

  • source
  • parent