-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path351.57e45aa3.chunk.js
More file actions
1 lines (1 loc) · 2.06 KB
/
351.57e45aa3.chunk.js
File metadata and controls
1 lines (1 loc) · 2.06 KB
1
"use strict";(self.webpackChunkfezcodex=self.webpackChunkfezcodex||[]).push([[351],{90351(e,s,t){t.r(s),t.d(s,{default:()=>c});t(9950);var r=t(44414);function c(){return(0,r.jsxs)("div",{className:"space-y-6 font-mono text-sm leading-relaxed",children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("strong",{className:"text-current",children:"Modules"})," are independent units of code with explicit interfaces (exports/imports). When imported, the compiler loads a semantic representation of the code, ensuring encapsulation and faster builds."]}),(0,r.jsxs)("div",{className:"border-l-2 border-blue-500/50 pl-4 py-2 my-6",children:[(0,r.jsx)("h4",{className:"text-xs font-bold text-blue-400 uppercase tracking-widest mb-2",children:"The C Approach (Includes)"}),(0,r.jsxs)("p",{className:"text-xs text-gray-400 mb-4 uppercase tracking-wide",children:["C lacks modules and relies on the"," ",(0,r.jsx)("strong",{className:"text-current",children:"Preprocessor"}),"."]}),(0,r.jsxs)("ul",{className:"space-y-3 text-xs text-gray-400",children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-current block mb-1",children:"Textual Copy-Paste"}),(0,r.jsx)("code",{className:"text-pink-400",children:'#include "header.h"'})," literally copies the file's text into your source file."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-current block mb-1",children:"Translation Unit"}),"The Source file + all copied Headers = one massive unit of code to be compiled."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-current block mb-1",children:"Object Files"}),"The compiler turns this unit into an Object File (`.o`)."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-current block mb-1",children:"Linking"}),"The Linker stitches these object files together to make the executable."]})]})]}),(0,r.jsx)("p",{className:"text-xs text-gray-500 border border-white/10 p-4 uppercase tracking-wide",children:'This "copy-paste" model is why C builds can be slow (headers are re-parsed every time) and why "include guards" are needed to prevent infinite loops.'})]})}}}]);