Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
i actually bought a whole physical php book, wasted 2 months reading it and then i switched to python.
-
Serious answer:
If you want to learn PHP, learn Symfony.
For Javascript I'd advise the opposite, "learn the language not the framework".
But PHP was meant as a templating language, then evolved into a reasonably good backend language. Symfony arguably forms the modern domain specific language through which this is achieved. Laravel is even higher in its abstractions, but does magical stuff that would make you a worse PHP dev if it was your first experience with the language.
Also, while Python is a better multipurpose language overall, I deem it worse as a pure backend language. It's great for data processing, for scripts and some types of middlewares. But its structure makes it messy and lacking in scalability for pure web backends. Python's flexibility makes it exceptionally suitable for science & analytics, but less so for structured models and services.
PHP is not a pretty language, but it's fast and useful, and arguably the easiest OOP language. -
I don't get it-- is the implication that PHP is hard?
What's wrong with it?
Granted, I don't like how soft it is but other than that it is a good language.
Also, @SukMikeHok, why would you get a physical book? -
@qwerty77asdf was determined to learn it because i needed to build a backend service so i went in a store in my city and bought a book. physical book so i can focus learning. ive read the whole book and still dont like php
-
@SukMikeHok ah ok-- do you have problems when focusing using online services?
Also what don't you like about it? -
@qwerty77asdf no i dont, i just spent 2 months of summer vacation to read it. idk, its just not for me. im not trying to shit on php, in my opinion coding backend in python is much easier, cleaner and not messy
-
Root825996y@bittersweet I agree with everything in your comment except the last sentence. PHP is not the easiest OOP language, especially because of its inconsistencies and arbitrary naming.
That crown belongs to Ruby. -
@Root I guess if you get fresh into programming, Ruby is quite simple, in the same way that Japanese is a simple language. Ruby is pretty and elegant, but also weird and alien.
-
Root825996y@bittersweet 😅 a little
But mostly when compared to strongly typed languages because Ruby is the antithesis of that. -
Root825996y@bittersweet Not at all. Quite the opposite:
Everything is an instance of a class. Classes can be patched (opening and adding/redefining its methods) and extended at runtime. Individual instances can also include other classes' functionality. So classes (and modules) are dynamic.
This allows you to use e.g. array methods on any data that looks like an array. (Range, hash, array, string, ...). In Ruby lingo, this is called "ducktyping" -- if it looks like a duck, acts like a duck, and quacks like a duck, it's safe to assume it's a duck.
This is even true for literals. `3` is an instance of Fixnum, and Fixnum extends Enumerable. Therefore `3` has access to all methods on both classes. 'Hi' is an instance of String (not a 3-byte char array), and `:Hi` is an instance of Symbol (think immutable Strings)
These "types" are also not static per var. `x=3; x+=0.5` coerces it from Fixnum into Float.
So, strongly typed? No.
Ruby is entirely object oriented, so there really aren't any types in the classical sense. Apples and Oranges are too similar, so Gravel and Dolphins is more fitting. -
@Root Ah, its just that wiki calls it "Typing discipline: Duck, dynamic, strong". I always get confused which one is which...
-
Root825996y@sauronjs its not like they change continually at runtime 😂. You can do this, of course, but that would just lead to chaos.
-
Barookh785y@bittersweet +1 to you bro.
I love to program in php+symfony, not really know why ppl don't like php...
That php joke again....
joke/meme