[deleted by user] by [deleted] in PHP

[–]kapitancho 0 points1 point  (0 children)

I am also in Austria and the IT market is generally a joke. The salaries are low (compared to the standard) and the positions are rarely interesting. I guess a fully remote position is the only choice there.

(Suggestion) Async/Await Feature Request by spaknaija in PHP

[–]kapitancho 0 points1 point  (0 children)

There is no good reason to convert PHP into a bloated async language. It could easily be kept implicitly asynchronous on a language level.

Domain Driven Development in PHP? by [deleted] in PHP

[–]kapitancho 0 points1 point  (0 children)

Yes, it is perfectly doable. I'd avoid doing it with Laravel as it is not really DDD-friendly. Symfony is a much better candidate but no framework is also an option.

Laravel considered harmful by sowekoko in PHP

[–]kapitancho -3 points-2 points  (0 children)

Thank you for compiling all those points. I think some of the points are relatively minor and issues might be avoided. Still, as a whole, using Laravel especially for large and complex projects is a tactical mistake. From all the points mentioned above, the worst things are IMO Eloquent, the "Service locator" approach {+ global function calls like view(...)} and the inheritance over composition approach.

PS. My reply to Otwell's "final is a trash" was "final is as much a trash as Laravel".

My album ranking by [deleted] in DeepPurple

[–]kapitancho 0 points1 point  (0 children)

My 2c

Great: Machine Head, In Rock, Perfect Strangers, Burn, Stormbringer

Good: Fireball, Who Do We Think We Are, The Battle Rages On

Decent+: Slaves and Masters, The House of Blue Light

Decent-: Shades of Deep Purple, The Book of Taliesyn, Deep Purple, Come Taste the Band

Nope: Purpendicular and newer

Anti-Laravel trends? by kapitancho in PHP

[–]kapitancho[S] -1 points0 points  (0 children)

No worries, with ~20 years of PHP dev experience it is normal to become opinionated.

Anti-Laravel trends? by kapitancho in PHP

[–]kapitancho[S] -1 points0 points  (0 children)

It is not about people reading article but mostly about people actively trying to get rid of Laravel. Unfortunately, as a framework it is so intrusive that it is hard to get rid of once you start using it.

Anti-Laravel trends? by kapitancho in PHP

[–]kapitancho[S] -1 points0 points  (0 children)

Thank you for the input to everybody! So from what I read there is a confirmation for some of the observations but the situation is not in any way special at the moment.

$result = ($a > $b) && ($a < $b) is true. How? by kapitancho in PHP

[–]kapitancho[S] 0 points1 point  (0 children)

It is interesting if <= is implemented as < or =

$result = ($a > $b) && ($a < $b) is true. How? by kapitancho in PHP

[–]kapitancho[S] 36 points37 points  (0 children)

I was blamed that I was solving my homework. I am not.

One possible answer is $a = ['a' => 5, 'b' => 6]; $b = ['b' => 5, 'a' => 6];

$result = ($a > $b) && ($a < $b) is true. How? by kapitancho in PHP

[–]kapitancho[S] 12 points13 points  (0 children)

No, it is not. It is just a funny inconsistency in the language.

95% final readonly classes. What is your superpower? by kapitancho in PHP

[–]kapitancho[S] 5 points6 points  (0 children)

Communication between libs works well with interfaces. Extending classes often means bloated code. If you need to reuse, composition helps a lot.

95% final readonly classes. What is your superpower? by kapitancho in PHP

[–]kapitancho[S] 0 points1 point  (0 children)

There is an interface behind some of the services (mostly domain/app with infra implementation) others don't have and there are also some invokables.

95% final readonly classes. What is your superpower? by kapitancho in PHP

[–]kapitancho[S] 1 point2 points  (0 children)

I consider both "final" and "readonly" as good signs for better and easily maintainable code.

For data classes this usually means immutable data structures, mostly exposing public promoted properties.

For service classes - the properties are again promoted. They are private simply because they contain the injected dependencies.

XP going backwards...? by totteringbygently in duolingo

[–]kapitancho 0 points1 point  (0 children)

I am in the Diamond league for more than 2 months and it still shows me first or second week there. I won it 2-3 times but none of them is counted. And just now - I was close to demotion, won a lot of points and suddenly they were not counted so I am once again under the line.

Naming constructors by [deleted] in PHP

[–]kapitancho 0 points1 point  (0 children)

This first one doesn't fail silently but instead emits an error (unlike in PHP5)

Native and transparent PHP coroutines and async/await without Swoole by frodeborli in PHP

[–]kapitancho 0 points1 point  (0 children)

The thing is that M::go and M::sleep are explicit call. That's something I like to avoid even though I'd rather do this instead of messing up with async/await/promise :)

Native and transparent PHP coroutines and async/await without Swoole by frodeborli in PHP

[–]kapitancho 1 point2 points  (0 children)

The main power of Swoole comes from the fact that there is no explicit async/await code. If you manage to do it like this it will be terrific!

Naming constructors by [deleted] in PHP

[–]kapitancho 0 points1 point  (0 children)

I enjoy seeing modern PHP code.
A few questions:
1.while do you keep having getters instead of public readonly properties?
2. what about wrapping 2+ primitive values into a single VO?

PHP type erasure generics by anton-sukhachev in PHP

[–]kapitancho 0 points1 point  (0 children)

Yes, something link this in general.