{ programming language }

  • My understanding of error handling

    Based on the Algebraic-data type, we can define a type that represents either success with a value or failure with a reason. It's often called Result. In Rust, this is a standard way to handle the error. In Kotlin and TypeScript, the languages provide an exception mechanism as the common way to handle the error, and there are third-party libraries that provide the Result type. In this article, I explain my understanding of error in programming and my ideal way to handle error.

  • My understanding of OOP and FP

    | /

    In my previous article, I explain my understanding of programming languages in general. In this article, I will explain how I view Object-oriented programming (OOP) and Functional Programming (FP).

    TL;DR: OOP is good for expressing general objects, while FP focuses on some specific cases. Kotlin and Scala match my understanding closely. Other languages like Rust and even TypeScript are also good if they can express the same idea that OOP and FP can.