https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • g

    green-activity-6102

    11/16/2022, 6:12 PM
    lol i have different feelings about vanilla PHP development from 10+ years ago
  • f

    freezing-waitress-26396

    11/16/2022, 6:12 PM
    PHP is not the same as it was 10+ years ago
  • g

    green-activity-6102

    11/16/2022, 6:12 PM
    screams in embedded MySQL queries
  • f

    freezing-waitress-26396

    11/16/2022, 6:13 PM
    PDO.jpg
  • f

    freezing-waitress-26396

    11/16/2022, 6:13 PM
    Pass objects, not embedded queries
  • r

    refined-waiter-90422

    11/16/2022, 6:13 PM
    oh and the null coalescing operator instead of
    isset()
    .. code can be super short now.
  • f

    freezing-waitress-26396

    11/16/2022, 6:13 PM
    Yes!!
  • g

    green-activity-6102

    11/16/2022, 6:14 PM
    im digging way back in my memory bank here but i think we were just starting to get onboarded with PDO before i abandoned PHP for Python/Django
  • f

    freezing-waitress-26396

    11/16/2022, 6:14 PM
    Comparing PHP now to 5.6 is like comparing 2010 Javascript to Javascript now
  • f

    freezing-waitress-26396

    11/16/2022, 6:14 PM
    Entirely different beast
  • g

    green-activity-6102

    11/16/2022, 6:14 PM
    that was after we had just finished adopting MySQLi...
  • r

    refined-waiter-90422

    11/16/2022, 6:14 PM
    my #1 complaint about python is lack of null coalescing. Like dear lord, guido I love your language, but ya. Verbose as shit compared to PHP
  • f

    freezing-waitress-26396

    11/16/2022, 6:15 PM
    The memories 😂
  • f

    freezing-waitress-26396

    11/16/2022, 6:15 PM
    Verbosity is one of my #1 gripes about any language, this is why I'm eyeing with htmx and hyperscript
  • f

    freezing-waitress-26396

    11/16/2022, 6:15 PM
    shakes fist at Java
  • r

    refined-waiter-90422

    11/16/2022, 6:15 PM
    ^ I may be a bit bias since using this.
  • g

    green-activity-6102

    11/16/2022, 6:16 PM
    wait Python technically does support null coalescing syntax using
    or
    ....
  • f

    freezing-waitress-26396

    11/16/2022, 6:16 PM
    what dialect is this
  • g

    green-activity-6102

    11/16/2022, 6:16 PM
    there are some gotchas but for most stuff it works
  • r

    refined-waiter-90422

    11/16/2022, 6:20 PM
    Use case: Retrieving a deeply nested value in a dict without throwing a
    KeyError
    . I know you can chain
    .get()
    , but you gotta do quite a few calls to get your value. PHP does not care, you can do
    $value = $thing['foo']['bar']['baz'] ?? null;
  • r

    refined-waiter-90422

    11/16/2022, 6:24 PM
    Technically you could put it in a
    try
    except
    block too, but it's like minimum 4 lines vs 1.
  • f

    freezing-waitress-26396

    11/16/2022, 6:26 PM
    ^
  • r

    refined-waiter-90422

    11/16/2022, 6:27 PM
    It's not quuuuite ready for public release, but I do hope to soon.
  • r

    refined-waiter-90422

    11/16/2022, 6:27 PM
    Admittedly, I've been a bit deep in the weeds whether or not to move to this dialect or stick to Python.
  • w

    witty-daybreak-45092

    11/16/2022, 6:27 PM
    I have a helper function in python for this that I wrote if you want it?
  • r

    refined-waiter-90422

    11/16/2022, 6:27 PM
    Sure!
  • r

    refined-waiter-90422

    11/16/2022, 6:28 PM
    @freezing-waitress-26396 On the bright side man, it's 100% compatible intermixing with normal PHP code, so very easy to interoperate. No need to wait.
  • r

    refined-waiter-90422

    11/16/2022, 6:29 PM
    You can even mix it with normal PHP in the same file.
  • f

    freezing-waitress-26396

    11/16/2022, 6:29 PM
    Any pointer to that? So I can bookmark and check every so often?
  • r

    refined-waiter-90422

    11/16/2022, 6:30 PM
    Also, side benefit, it's compatible with VSCode and Sublime highlighters out of the box
1...911912913...1146Latest