mariusbancila.ro mariusbancila.ro

No more plain old data

When working in C++, you often hear about POD types (which stands for Plain Old Data). PODs are useful for communicating with code written in other programming languages (such as C or .NET languages). They can also be copied using memcpy (which is important because this is a fast, low-level function that provides performance benefits), and have other characteristics that are key for some scenarios. However, the new C++20 standard has...

github

The programming language I'm proud of: queryable type system, first class polymorphisms(type hole), type classes/traits, module as records, row polymorphisms, derived from ML's concise syntax

RemuLang/proud The programming language I'm proud of: queryable type system, first class polymorphisms(type hole), type classes/traits, module as records, row polymorphisms, derived from ML's concise syntax Users starred: 9Users forked: 0Users watching: 9Updated at: 2020-05-12 02:42:52 Proud Programming Language Feature Row polymorphisms(Extensible Records)! First class polymorphisms! Type classes/traits! Modules as...

viblo.asia viblo.asia

Using PHP Traits for Laravel Eloquent Relationships

Ở dự án tôi đang làm, trong khi phát triển tính năng mới, tôi thấy cần phải sử dụng lại các phương thức ở các class khác, mà PHP lại không hỗ trợ đa kế thừa. Rất may họ đã sinh ra Traits để giải quyết vấn đề này. Có một đoạn code ví dụ đơn giản như thế này: <?php namespace App; use Illuminate\Database\Eloquent\Model; /** * Class Post * *...