5 ms·
> Why would I choose PHP when starting a greenfield project? Because you don't know better. If all you have is a hammer, everything looks like a nail. Ruby +
by cies 5y ago
> Why would I choose PHP when starting a greenfield project?
Because you don't know better. If all you have is a hammer, everything looks like a nail.
Ruby + Rails is miles ahead of PHP + Laravel. If you want more static typing (which I currently believe is a good thing) I really like Kotlin (+ KTor or + Javalin). If you are okay without OO and like static typing Haskell + IHP is pretty complete. If you are okay with learning about low-level stuff, Rust + Actix is really nice.
All of this may require learning new things, and coming from PHP that's a good thing. PHP and JavaScript are not languages that help you become a better programmer. They are messy and lack important features (sum-types).
- christophilus 5y agoYou can write JavaScript via Typescript, and you now have one of the best and most popular languages there is (including sum types). There are still a lot of warts, but it’s actually a really nice language IMO.
- cies 5y agoHave you seen ReScript and/or ReasonML? They are much nicer IHMO, but, yes, not as popular.
- christophilus 5y agoI've played with them quite a bit from the first time they were mentioned on HN. I really like OCaml. But the tooling and ergonomics are heavily in TypeScript's favor at this point, and at least for me, that makes a bit difference in day-to-day work. Anyway, my favorite of that variety of languages is PureScript. It's almost perfect.
- cies 5y agoI wholly agree about PureScript. Elm's also nice. I like the fact that it is a little dumb down (same could be said for early Java and Go), it creates code everyone can read. While it is still very Haskelly in day-to-day practice. In fact I'd say PureScript and Elm are stronger typed than Haskell (as e.g. `head` in Elm evals to a Maybe).
- egeozcan 5y agoTypescript hits that sweet spot of popularity/portability/type-safety, and although ReasonML is superior in nearly any technical criteria imaginable, I still reach to TS when I'm starting new.
- nicoburns 5y agoNo good backend frameworks comparable to Rails/Laravel/Django in JavaScript though (and I say this as someone who works with JS backends in my day job).
- rd07 5y agoThere is AdonisJS, a JS framework inspired by Laravel. I don't know if it has 1:1 feature comparison with Laravel, but for someone who uses Laravel daily like me, it seems nice.
- phphphphp 5y agoI like TypeScript as a language to write, but find the compilation process to be almost impossible to tolerate. Every time I return to an old project and try to compile it again, something is broken: from a dependency deciding to change their own compilation process for one incompatible with mine, to some deep dependency of my own compilation process changing which conflicts with some other part of my process. I spend more time on my project's compilation process than the project itself: something that is only true of TypeScript. Things are improving as more and more "batteries included" projects are launched, and it's better today than it was a year ago, so I'm happy about the positive change and I am optimistic about the future, but right now I can't begin to imagine labelling TypeScript as even close to being one of the "best" languages, because delivering software with it is a nightmare. TypeScript is great to write but hell to turn into JavaScript.
- MrBuddyCasino 5y ago
- cies 5y ago
- fraktl 5y ago
- felix_n 5y agoFollow-up question: why is there always someone like you, shit-talking someone for an inoffensive post, demanding evidence while also refusing to waste your precious time providing any? Sorry if the cool kids are making make you feel left out, with their type systems and borrow checkers and monads.
- mgkimsal 5y ago
- lnxg33k1 5y agoRuby + Rails is miles ahead of PHP + Laravel. Wtf are you saying Willis.. but i guess it's a matter of preference, also consider that in PHP you can also use symfony which is my preference, but regardless of everything, you either come here with a list of things that make ruby on rails miles ahead or people is just going to classify your ideas as worthless
- felix_n 5y ago> Wtf are you saying Willis.. Is that a metaquote or something? Mr. Belvedere doing an impression of "the children's favorite programme?"
- lnxg33k1 5y agoYeah it was a quote but i translated literally from Italian 1:1 and i guess it was hard to catch in English https://youtu.be/bJd1RktjYTU https://youtu.be/bJd1RktjYTU
- edoceo 5y agoThe phrase is "what you talkin bout Willis" - I think it's from the American TV show Different Strokes.
- sidkshatriya 5y ago> PHP and JavaScript are not languages that help you become a better programmer. One can do some really beautiful programming in both modern JavaScript and modern PHP. Both these languages can and have helped millions of programmers become better programmers. Today's JavaScript and PHP are no longer the hacked up languages they once were.