Comment on: Why Python is not the programming language of the future
0 22 Apr 2020 01:40 u/ScionOfZion in v/programmingComment on: How To Implement Complex Data Integrity Constraints And Rules
COBOL never died. It just migrated to databases. Look at this shit.
CREATE TRIGGER check_book_pages
AFTER INSERT ON chapter
FOR EACH ROW
BEGIN
DECLARE total_pages INTEGER;
DECLARE new_pages INTEGER;
IF @new_pages > @total_pages THEN
SIGNAL SQLSTATE '45000'
END IF;
END ^;
A book has a maximum number of pages? In the database? What? If a programmer can see something is invalid then the constraint belongs in the database. That's the best place for it. You suck it up and you write that COBOL. But if only a manager can say something is invalid? Those constraints should go in a domain model somewhere. He's going to change his mind.
Comment on: Why Python is not the programming language of the future
It would be .GetState()
Comment on: Why Python is not the programming language of the future
Yup. Think about the code, not formatting. It's not a fucking word document. I love typing a bunch of crap and then hitting auto-format and watching it all come together.
Comment on: Why Python is not the programming language of the future
As a recent dotnet-core convert and former ruby fag who sees no reason for python, you are correct in at least my case.
Comment on: Dynamic Typing vs. Static Typing
I disagree. Anything more than a 1-liner benefits from static types. Untyped code should be static generic. Type inference can make this as convenient to write as dynamic types.
Comment on: Dynamic Typing vs. Static Typing
Call it logging. Rich men call it logging.
You know you really should learn Python. It's the most up and coming language. It's very popular now. Many business use it. If you want to earn money programming you must know Python. It's the way forward.