Skip Navigation

Dominik Chrástecký - Blog

@ dominik @chrastecky.dev

Posts
22
Comments
9
Joined
1 yr. ago

I'm a developer and an architect with ~10 years of experience. My languages of choice are PHP (Symfony), C#, Go and Typescript. With a tiny bit of Java and C++ here and there. I often write open source libraries, you can find my work on my GitHub. I started this blog for 3 reasons: I've wanted to start a blog for the last 15 years but never had time, I wanted a personal place where I can share whatever's on my mind, and I wanted to create something that uses ActivityPub.

  • Updated the article, thanks! Wouldn't really say that's a stupid addon, though, the expected way to use readonly properties from other languages is assign the value directly (impossible in PHP) or inside the constructor (or other mechanisms that are only available during object creation, like C# initializers etc.).

  • Oh, right, that didn't occur to me. Well, guess I got used to it eventually. But yeah, the ... already does way too many things in PHP.

  • I would've preferred ?, but ... is fine, IMO.

  • Programming @chrastecky.dev

    New in PHP 8.5: The Pipe Operator

  • Programming @chrastecky.dev

    Go Meets PHP: Enhancing Your PHP Applications with Go via FFI

  • I like it as well, recently had one use case where it would have been the best solution, sadly php-cs-fixer chokes on that so I had to do it with property hooks.

  • Programming @chrastecky.dev

    New in PHP 8.5: Asymmetric Visibility for Static Properties

  • Programming @chrastecky.dev

    New in PHP 8.5: Final Promoted Properties

  • Programming @chrastecky.dev

    New in PHP 8.5: Levenshtein Comparison for UTF-8 Strings

  • Programming @chrastecky.dev

    New in PHP 8.5: Attributes on Constants

  • Same, but given how seriously they take BC breaks, I don't really see it happening. Well, at least we have mature tooling to avoid having horrible code in production code-bases.

  • Well, that's historical, if PHP was being designed today, I think a lot of the things would look very different. As everything since version 7.x, this is a step in the right direction of making the language modern and safer to use.

    Like, this is still PHP, both of these are equally valid:

     
        
    <?php
    
    function hello(string $name): string {
      return "Hello, {$name}!";
    }
    
    function hello($name) {
      return "Hello, $name!";
    }
    
      

    So anything that makes it possible to write a good, clean code is a great addition, IMO.

  • Programming @chrastecky.dev

    New in PHP 8.5: Marking Return Values as Important

  • Programming @chrastecky.dev

    Creating a Simple Encrypted Matrix Bot in Go

  • Technology @chrastecky.dev

    ActivityPub: The Good, the Bad and the Ugly

  • Programming @chrastecky.dev

    Static Typing for the AWS SDK for PHP

  • Hmm, that build number would definitely be better! I tried adding another level (like 1.0.0.84) but that didn't work. I'll try it with the build numbers.

    I wrote a GitHub workflow that transpiles it on release and tags each transpiled version, then pushes those tags to the repo. Packagist automatically fetches tags, so it gets them automatically.

    For example, the tag v2.7.082.

  • Programming @chrastecky.dev

    Transpiling PHP for older versions

  • 3D printing @chrastecky.dev

    OpenSCAD configurable calendar 3D model

  • You mean the blog post I wrote myself and published on my ActivityPub enabled blog? That kind of "spam bot"?

  • Gaming @chrastecky.dev

    Persistent packages on Steam Deck using Nix

  • Programming @chrastecky.dev

    Lazy objects in PHP 8.4

  • Programming @chrastecky.dev

    Strongly typed ng-template in Angular