6 ms·
Please remember that PHP is more or less the only truly free (as freedom) community driven language suitable for both prototyping/pet projects and enterprise gr
by SergeAx 6y ago
Please remember that PHP is more or less the only truly free (as freedom) community driven language suitable for both prototyping/pet projects and enterprise grade web software development. TypeScript and C# are Microsoft, Go is Google, Java is Oracle. Python is not suitable for complex multi-layered systems, Rust is too young and let's see where it will go without Mozilla. Ruby? IMO Ruby is in sunset phase, no new ambitious projects are started with Ruby.
- asmosoinio 6y ago> Python is not suitable for complex multi-layered systems For example what?
- SergeAx 6y agoIt is too loose typed and it's implementation of interfaces is too relaxed to use complex software engineering patterns and methodologies like DDD and SOLID.
- andrekandre 6y ago> it's implementation of interfaces is too relaxed as someone only casually used to python im curious how so?
- SergeAx 6y agoIt only has duck-typed interfaces, unable to verify methods' signatures. Trying to implement strong inheritance leads to monstrosities __instancecheck__ and __subclasscheck__ and manual type checking of injected dependencies.
- darkstar_16 6y agoYeah, really interested to know why ?
- sullyj3 6y agoHaskell is very free, and very suitable for complex systems!
- swiley 6y agoGo isn't free? JS isn't free? Guile (which is probably as free as you can get) comes with a web framework too. Also what does "enterprise grade" mean? I'm not sure if you're aware but the forum we're talking on right now is written in PG's lisp dialect. I'm pretty sure arc is free.
- SergeAx 6y agoGo will go where Google wants. If you are not Google, you have zero chance introducing substantial changes into it. JS is not a programming language, it's some nonsense.
- swiley 6y agoIf we count C as a programming language with all it's nonsense we have to count JS. Your point with Go makes sense (although IMO it's better than most of google's "open source" projects.) You didn't have an answer for Guile though. I'd pay money to be able to build web apps in scheme instead of PHP.
- SergeAx 6y agoWhat nonsense in C makes it comparable to JS? JS today is more like assembly language, other high-level languages are translated into JS.
- SergeAx 6y agoI know nothing about Gulie. That makes me think it is some niche language with no ecosystem, no frameworks and limited number of packages. Go is good, but my point was not about goodness, but about language being free and community-driven.
- Shorel 6y agoRuby is a fantastically good language with a slow bloated runtime. That killed Ruby. Python was less good and less bloated, but still bloated. I think we use Python now only because our computers are orders of magnitude more powerful than a decade ago when I was watching Python Zope slow to a crawl and die.
- SergeAx 6y agoI think we use Python now because it is a language of choice in US schools, colleges and universities. Python is a new Basic.
- joelbluminator 6y ago> no new ambitious projects are started with Ruby What does this even mean, only lazy ass projects are started with Ruby? Yes Ruby is declining in popularity, as does PHP. It doesn't mean these languages are dying, there's just way more options to choose from these days.
- kstrauser 6y ago> Python is not suitable for complex multi-layered systems But PHP is? I cannot imagine a "complex multi-layered system" for which PHP is a better solution than a Python stack.
- SergeAx 6y agoPHP has (almost) complete strong typing system and all the bells and whistles of OOP needed to implement said systems using proper patterns and methodologies and make it modular and testable enough to be robust and supportable for a long time.
- kstrauser 6y agoPython has literally all of those things, and has been strongly (but dynamically) type from the very beginning. PHP is still weakly typed today. This code doesn't raise a warning or anything: $ php --version PHP 7.3.11 (cli) (built: Jun 5 2020 23:50:40) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies $ php -r 'echo "123" + 45;' 168 Contrast with Python: Python 3.8.3 (default, Jun 1 2020, 10:55:34) >>> "123" + 45 Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can only concatenate str (not "int") to str
- SergeAx 6y agoThese examples are not about strong typing, but about type juggling. Strong typing is this: declare(strict_types=1); use \Domain\SomeItem; use \Domain\SomeItemId; use \Domain\SomeItemSpec; abstract class SomeItemRepo { public function GetOneByID(SomeItemId $id): SomeItem; /* * Still hacky * * @param []SomeItemSpec $specs * * @return []SomeItem */ public function GetManyBySpecs(array $specs): array; }
- kstrauser 6y agoThat's an example of strong typing specific to PHP, then, and not used in the rest of computer science. What you're describing there is usually known as static typing, which Python also supports.