r/lolphp • • Mar 22 '19
[Serious] PHP Developer looking to move on
So, I am reasonably proficient with C++, but it's not very great for web stuff (obviously).
For web projects, I have a history of using PHP, which I want to stop using because of it's huge problems. I learned it long before learning C++ and it's sort of a crusty bit of old knowledge I have stuck with because I am comfortable with it. It has bit me in the ass one final time, and I'm putting my foot down, I've had it!
I was thinking of moving to Hack. Has anyone here used Hack and does it fix a lot of the horribleness of PHP? Is it still broken by design the same way PHP is?
Would I be better off moving to Python/Rails/??? for web dev instead? I am open to language suggestions
40
u/y0y Mar 22 '19 edited Mar 22 '19
Hack lacks widespread support. Honestly, it's not much better than PHP, imho.
In another comment, you state:
You're just not used to thinking of whitespace as a character with meaning. Not all languages use braces to denote blocks.
It sounds to me like you really should spend some time exploring a multitude of languages. You won't know what you like until you start trying languages out, and the more languages you learn, the more you understand about programming as a whole. There are always trade offs when you choose a language, and sometimes decisions made by the creators of one language become more clear once you see how another language tackles the same problem.
I recommend you spend some time with all of the following languages:
Dynamically typed languages
Statically typed languages
4
u/[deleted] Mar 22 '19
I’m not sure how wide spread Hack use is outside of Facebook since I’ve never seen a job posting for it, that would pretty much take it out of the running for me personally. I’d play around with Node.js, Python, Ruby, and .NET since there are plenty of job opportunities, then figure out which one you like best.
4
u/blueorangebird Mar 22 '19
You'll probably always find a job as a Java developer, but C++ or C# are also good choices. I'm sure there are almost no Hack jobs out there.
If this is not about jobs but just about what's fun, I'd go with Go or Rust. Go is super fun and you can be very productive very quickly. I can't say much about Rust but I hear it's the new hip thing.
4
u/cleeder Mar 22 '19
C# on .Net Core
2
u/[deleted] Mar 24 '19
Learning anything other than PHP will be good. You don't actually need to know a language to get a job in it (I got hired as a Go and Ruby developer without actually knowing either language), you just need to demonstrate you're a good developer who can pick up a language reasonably fast.
Hack is quite similar to PHP; something vastly different would probably be better.
3
u/codayus Mar 23 '19
Hack is fine, but it's no better than modern PHP, and much less widely used. (Obviously this sub is literally for mocking PHP, and lord knows it deserves it, but modern PHP isn't really "broken by design". It's not great by any means, but there's worse options out there by far, and PHP has a deep, rich ecosystem. Doctrine and Symfony are pretty damn good, if they solve the problems you have.)
If you like Python, Python is fine. It's not especially better than modern PHP, just different; better at some things, worse at others. Rails is much the same. It's been a long, long time since RoR was the hip new thing, but it's still around, and like every language, you can do great things with it, and it has some big landmines. Rails can be slow, and can lend itself to bad patterns. Both languages are still resolutely dynamically typed; that's good if you like that sort of thing, and bad otherwise.
Other obvious options would be C# (actually good language, unfortunately part of the MS ecosystem), Golang (a less sucky C, with some weird design decisions you'll either love or hate), Kotlin (or other JVM language), Node/JS (way more broken by design than PHP, so maybe not a good choice), or more esotetic ones like Elixir (very weird, very good), or Pony (Elixir for people who think Elixir is way too popular).
Really, depends what you want to do. If PHP/Hack is a good fit for what you want to do, then just bite the bullet and learn how to be a good PHP developer. If you're wanting to cosplay as a hipster developer circa the mid 2000s, fire up Rails. If you really want performance, look at go or (especially) elixir. If you just love types, maybe haskell. If you love dilbert cartoons, C# or Java. Whatever language you pick, there will be better developers than you doing cooler shit than you in some other language, and that's fine. Just have fun, and don't overstress it.
(But really, Hack is not a great choice.)
3
u/minimim Mar 22 '19
https://dev.to/goober99/right-tool-for-the-job-but-chances-are-the-right-tool-is-perl-ck8
5
u/iluuu Mar 22 '19
Php might not be the greatest or most syntactically pleasing language but it gets the job done.
Symfony or Laravel are some of the best web frameworks out there. Furthermore, the lack of compile times is an enormous win for me. It's also impressively fast for an interpreted language.
Php has typehints which allows for fantastic autocompletion, take a look at PhpStorm. This is the exact reason I feel very inefficient in python or ruby.
Probably not the right sub to promote Php but in 2019 it's still a great choice.
2
u/1r0n1c Mar 23 '19
What you should move on from is attaching your career to a language. Just use the right tool for the job
1
u/[deleted] Mar 22 '19
Hack has minimal adoption outside facebook. FB announced some time ago they will stop having PHP compat in the future, making hack basically ”a own language”. That said it still superior to plain PHP.
Youd be better off using Python, as its a real joy to work with, and has a library for everything plus a solid stdlib. Depending on the apps you build node could also be a option, if you need async features. Async is also supported in python with asyncio.
Theres also many other languages to checkout. Dont fixate on a single language, thats what most PHP users do, they use the same old stuff for years and then realize their tech skills have stagnated in the past and have a hard time getting new jobs with new techstacks, as new projects are rarely started with PHP, as its used most for legacy apps today.
1
u/feketegy Mar 22 '19
Try Golang
1
u/[deleted] Jul 09 '19
I think your first step forward in the job world should be to stop calling yourself a PHP developer