3
dUcKtYpEd
24d

Would I use php for a api prototype? Sure, it’s quick to build out with. Would I build my own personal projects in laravel with the max team potential reaching a few devs? Definitely, laravels fantastic and it’s testing suites a breeze.

Would I use it for a large scale application build with a large upward momentum? A project that will become a company and take on teams of devs? I’m a lot more hesitant. When you’re working with PHP or any ducktyped language, you really have to enforce good documentation and annotation standards.

Strict typed languages you could say document themselves with their strict nature where php , JavaScript, racial you have to rely on the dev to include those necessary annotations/comments. Otherwise you have PR requeststhat make little sense.

You bring on newcomers who can’t understand what goes where looking at anonymous functions taking objects that aren’t even type hinted. I will say though that the PHP I knew and loved has morphed into a more strictly typed (when preferred) beast.

I’m really quite happy with where it has come and you really either get the language or you don’t. Ruby no matter how hard I try it’s still confusing cluster fuck to me in the same way PHP is an annoyance to many. And that’s ok

Comments
  • 1
    Just wanted to note that PHP is slowly getting there. Each iteration since 7.0 brings some more type safety and an optional strictness. Still, it has a long way to go, so for now if you really need something precise you're better off with other languages.
  • 0
    I’m inclined to agree. It’s keeping up because it’s community is ridiculous in size and symfony/laravel keep adding to its popularity. But I’m hesitant with building anything professional with it where stakes are high
  • 1
    You should try a functional language (or at least f#). In those datatypes are pretty much UML :v
  • 0
    @inaba I use node for a lot of projects with a very functional approach. Trying to figure out elixir a bit. It’s something else. Functional programming the future though.
  • 1
    @dUcKtYpEd I did a school project in f# and it was really insane. It's like "oh you have type person that has a FirstName, MiddleNames, and LastName. None of them are of type strings because that isn't descriptive enough but rather FirstName is of a type called FirstName, MiddleNames is of a type that is either an array of strings or None called MiddleNames, and LastName is a type of either string or None called LastName. And bro you better believe I'll remind you when you forget to check for None!"
  • 1
    Typescript has something similar build in and I love it. Being forced to do null (or even undefined) checks is one of the best features.
  • 0
    That’s interesting I’ve never looked into f# but all the C# guys I know are taking interest in it. I’ve put more in the C-sharp just because every job in town is on .net core now with angular or react spas.
  • 0
    @inaba i’m working on moving a Codebase from angular JS to angular . So far I’m really enjoying typescript
  • 0
    @dUcKtYpEd Yeah it was really fun. Especially with something like SQLProvider that not only gave some really nice ways to access pretty much any database, but that shit could actually extract datatypes from the database.
Add Comment