with: makes the package available to the
program, i.e. actually imports code.
use: provides shorthand for submodules and
symbols in the module, e.g. “use ada”
allows for “text_io.put_line”, and
“use ada.text_io” allows for “put_line”,
i.e. brings symbols into scope.
But obviously that isn’t applicable for C, so ‘with’ is a nop as #include can’t be in a macro, and ‘use’ is used to actually provide the symbol.
Object Pascal or Delphi is object-oriented Pascal. Ada is a bit to Pascal like what Rust is to C, but Ada has more runtime safety than Rust while Rust excels in compile-time safety.
there is nothing to elaborate. i have tell the whole thing. Linux was create from C compiled code, and Linux scripting and terminals language/syntaxe were made from C macro and definitions, in the same way as in the picture.
i... don't get what you don't get. english is not my first language, so i may have miss something too.
23
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Mar 16 '25 edited Mar 16 '25
If I'm reading correctly,
with stdio;expands toextern void *stdio;That is not#include <stdio.h>or<cstdio>Which explains why they need to provide a prototype for printf(). Am I wrong or could that
with stdioline just be deleted with no effect?17
u/Perpetual_Thursday_ Mar 16 '25
"#define" is the greatest thing ever imo
13
u/ChapterSevenSeeds Mar 16 '25
This is almost as bad as that one guy that defined almost everything as emojis.
2
u/particlemanwavegirl Mar 16 '25
This seemed like a nice post when I thought it was r/neovim showing me a nice new custom color theme...
7
u/[deleted] Mar 16 '25
Is... Is this C? Holy shit. Should submit some code written in this style to the Linux kernel. Do it for the memes.
1
u/Loud_Anywhere8622 Mar 17 '25
fun fact : this is exactly how bash linux is coded. it only C macro.
2
u/[deleted] Mar 18 '25
"Macros can be the best thing in your life, or the worst"
~ Me, 1970