打造開發者友善的錯誤處理方式(feat. Java, Go, Rust, TS)
錯誤處理是所有程式都會遇到的問題,特別是在複雜的網頁開發中更是如此。本文將研究不同方法模式與語言探討如何「打造開發者友善的錯誤處理方式」。推薦演講:Unexpected Monad. Is Safe Error Handling Possible in JS/TS?
錯誤處理是所有程式都會遇到的問題,特別是在複雜的網頁開發中更是如此。本文將研究不同方法模式與語言探討如何「打造開發者友善的錯誤處理方式」。推薦演講:Unexpected Monad. Is Safe Error Handling Possible in JS/TS?
近期在遷移舊的 Element Plus 專案是必要找到另一款客戶端表單驗證方案,而在使用 Shadcn Vue 過程中發現 VeeValidate 是一款針對 Vue 製作的無頭表單驗證工具,你可以攜帶自己的 UI 整合,使用原生表單元件也不是問題。
Understanding "Polymorphism" is like "doing something, but the way it is done varies" For example, various "shapes" can "calculate area,"
对于「多型 Polymorphism」的概念理解像是「要做一件事,但这件事对不同对象来说实践的方式不同」。具体来说像是各种「形状」都可以「算面积」,但背后实践的方法却不同,而在 Go 当中 interface 就是方法的集合。
對於「多型 Polymorphism」的概念理解像是「要做一件事,但這件事對不同對象來說實踐的方式不同」。具體來說像是各種「形狀」都可以「算面積」,但背後實踐的方法卻不同,而在 Go 當中 interface 就是方法的集合。
The first time you see a Go Receiver function, you might wonder what this strange syntax is, with parameters accepted before the function name?
第一次看到 Go 的 Receiver 函数会觉得这是啥怪语法,函数名前面还能接收参数?Go 语言提倡「Composition over inheritance」,并极力追求代码的简洁性,以此规避 class-based OOP 所带来的复杂性。
第一次看到 Go 的 Receiver 函式會覺得這是啥怪語法,函式名前面還能接收參數?Go 語言提倡「Composition over inheritance」(組合優於繼承),並極力追求程式碼的簡潔性,以此迴避 class-based OOP 所帶來的複雜性。
Go's design has all values passed by value; to achieve passing by reference effect, Pointer must be used explicitly.
Go 设计上一切数值都是直白的「Passing by value」,会有「Passing by value」的效果原因是因为 Reference Types 带有指标,复制时是复制指标值。要让 Value Types 有 Passing by Reference 的效果要显式的使用 Pointer。
Go 設計上一切數值都是直白的「Passing by value」,會有「Passing by value」的效果原因是因為 Reference Types 帶有指標,複製時是複製指標值。要讓 Value Types 有 Passing by Reference 的效果要顯式的使用 Pointer。
TanStack Table is a awesome library that at first glance may seem overly complex but actually saves countless hours of time.
前端生涯中遇到无数攸关资料呈现的需求需要解决,而 TanStack Table 是一款第一眼看起来很多余复杂但实际上能省下无数时间的一个优质套件,如果有任何「大量表单、中大型表单应用」我会强烈推荐。在实际工作中我透过导入 TanStack Table 在几天时间内就能把现有表单大多复杂功能重现。
前端生涯中遇到無數攸關資料呈現的需求需要解決,而 TanStack Table 是一款第一眼看起來很多餘複雜但實際上能省下無數時間的一個優質套件,如果有任何「大量表單、中大型表單應用」我會強烈推薦。在實際工作中我透過導入 TanStack Table 在幾天時間內就能把現有表單大多複雜功能重現。
Using TypeScript to ensure type safety in large frontend projects is common, but API communication can introduce vulnerabilities that compromise type safety.