Tagged articles

Conditional Compilation

12 articles · Page 1 of 1
liandk
liandk
May 9, 2026 · Frontend Development

Master Uniapp Conditional Compilation for H5, Mini‑Program, and App

This guide explains why Uniapp projects need platform‑specific adaptations, introduces the fixed #ifdef/#endif conditional compilation syntax, lists the three main platform identifiers, and demonstrates how to apply conditional blocks in templates, scripts, and styles, followed by reverse conditions, practical cases, tips, and troubleshooting.

App DevelopmentConditional CompilationH5
0 likes · 6 min read
Master Uniapp Conditional Compilation for H5, Mini‑Program, and App
Golang Shines
Golang Shines
Mar 25, 2026 · Backend Development

Getting Started with Go Build Tags: Controlling Compilation Like Building Blocks

This article explains how Go build tags let you include or exclude source files at compile time, showing practical scenarios such as platform‑specific binaries, debug versus release builds, feature‑flagged editions, and selective test execution, plus methods to verify tag activation.

Conditional CompilationFeature FlagsGo
0 likes · 11 min read
Getting Started with Go Build Tags: Controlling Compilation Like Building Blocks
Golang Shines
Golang Shines
Mar 2, 2026 · Fundamentals

How to Use Conditional Compilation and Build Tags in Go

The article explains Go's conditional compilation mechanisms, covering file‑name suffixes, //go:build tags, practical cross‑platform examples, a zero‑overhead logging demo, and guidance on choosing the appropriate method for maintainable code.

Conditional CompilationGobuild tags
0 likes · 12 min read
How to Use Conditional Compilation and Build Tags in Go
Code Wrench
Code Wrench
Oct 23, 2025 · Backend Development

Master Go Conditional Compilation: Build Constraints, Tags & Examples

Learn how Go’s powerful conditional compilation system—using file suffixes and build tags—enables precise control over platform-specific code, debug/release modes, and feature toggles, with detailed explanations, common pitfalls, a full-featured logger example, Makefile automation, and CI/CD integration.

Conditional CompilationGoMakefile
0 likes · 10 min read
Master Go Conditional Compilation: Build Constraints, Tags & Examples
BirdNest Tech Talk
BirdNest Tech Talk
Jul 30, 2024 · Fundamentals

Master Conditional Compilation in Rust with cfg_if: A Practical Guide

This article explains how the Rust cfg_if crate simplifies conditional compilation by providing a macro that replaces nested #[cfg] attributes with clear if‑else or match structures, shows step‑by‑step usage, advanced patterns, and compares cfg_if to raw #[cfg] for readability and maintainability.

Conditional CompilationRustbackend
0 likes · 8 min read
Master Conditional Compilation in Rust with cfg_if: A Practical Guide
Liangxu Linux
Liangxu Linux
Jul 25, 2024 · Fundamentals

Master Essential C Language Features: Bitwise Ops, Macros, Conditional Compilation, and More

This guide explains core C programming concepts—including bitwise operators, macro definitions, conditional compilation directives, extern declarations, typedef aliases, struct usage, and the static keyword—providing clear examples and code snippets to help developers write more efficient and maintainable code.

C++Conditional CompilationMacros
0 likes · 10 min read
Master Essential C Language Features: Bitwise Ops, Macros, Conditional Compilation, and More
Alibaba Terminal Technology
Alibaba Terminal Technology
Aug 11, 2023 · Frontend Development

Mastering Conditional Compilation for Efficient Cross‑Platform Mini‑Program Development

This article explains how conditional compilation can eliminate redundant code in cross‑platform mini‑program projects, describes the syntax and implementation details in MorJS, and shows practical examples for code‑level and file‑level compilation strategies that improve performance, maintainability, and product consistency.

Conditional CompilationMini ProgramMorJS
0 likes · 15 min read
Mastering Conditional Compilation for Efficient Cross‑Platform Mini‑Program Development
Liangxu Linux
Liangxu Linux
Jul 30, 2023 · Fundamentals

5 Little‑Known C Tricks That Can Boost Your Code

This article explores five obscure yet useful C language features—enum bit‑fields, label‑and‑goto error handling, varargs functions, unconventional union usage, and conditional compilation—providing clear explanations and code examples to help programmers write more flexible and efficient code.

Advanced TechniquesC++Conditional Compilation
0 likes · 5 min read
5 Little‑Known C Tricks That Can Boost Your Code
BaiPing Technology
BaiPing Technology
Jan 31, 2022 · Frontend Development

On-Demand JS Imports: async import(), Babel plugin, Tree Shaking, Conditional Compilation

This article explains various on-demand import techniques for modern JavaScript projects, covering the native async import() syntax, the Babel plugin-import for selective library loading, Tree Shaking to eliminate dead code, and conditional compilation using tools like uglify-js-plugin and js-conditional-compile-loader.

Conditional CompilationFrontenddynamic import
0 likes · 11 min read
On-Demand JS Imports: async import(), Babel plugin, Tree Shaking, Conditional Compilation
Qunar Tech Salon
Qunar Tech Salon
May 10, 2016 · Fundamentals

Best Practices for Deleting Code and Managing Dead Code

The article explains why and how to properly delete or disable unused code, emphasizing the use of source‑control systems, clear commenting, conditional compilation, and disciplined cleanup to reduce noise, uncertainty, and maintenance overhead in software projects.

Conditional Compilationcode deletioncommenting
0 likes · 10 min read
Best Practices for Deleting Code and Managing Dead Code