{ "uuid": [ { "value": "02c9e148-b98f-42ae-80f1-d19a6d3fcfb2" } ], "langcode": [ { "value": "en" } ], "type": [ { "target_id": "daily_email", "target_type": "node_type", "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" } ], "revision_timestamp": [ { "value": "2025-05-11T09:00:18+00:00" } ], "revision_uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "revision_log": [], "status": [ { "value": true } ], "uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "title": [ { "value": "Types are optional" } ], "created": [ { "value": "2024-03-06T00:00:00+00:00" } ], "changed": [ { "value": "2025-05-11T09:00:18+00:00" } ], "promote": [ { "value": false } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": "\/daily\/2024\/03\/06\/types-are-optional", "langcode": "en" } ], "body": [ { "value": "\n

The main programming languages I write are PHP and JavaScript.<\/p>\n\n

Both offer types where, as well as declaring a parameter or property, you can define what type it is - whether it's a string, array, boolean, etc.<\/p>\n\n

Adding types is optional.<\/p>\n\n

You don't need to add types to your PHP code, and you can choose to write plain JavaScript instead of TypeScript.<\/p>\n\n

Some people prefer simpler or cleaner code or less \"visual debt\".<\/p>\n\n

I like the extra clarity that types add.<\/p>\n\n

I like to be able to read some code and immediately know what types things should be.<\/p>\n\n

I like the clearer errors and messages if a different type is given than was expected.<\/p>\n\n

Tools like PHPStan know more about my code and give better recommendations than if I don't add types.<\/p>\n\n

I like the better autocompletion I get when writing code that has types.<\/p>\n\n

I like types, but I also like the flexibility of whether or not to add them and for Developers and development teams to make their own decisions based on their preferences.<\/p>\n\n ", "format": "full_html", "processed": "\n

The main programming languages I write are PHP and JavaScript.<\/p>\n\n

Both offer types where, as well as declaring a parameter or property, you can define what type it is - whether it's a string, array, boolean, etc.<\/p>\n\n

Adding types is optional.<\/p>\n\n

You don't need to add types to your PHP code, and you can choose to write plain JavaScript instead of TypeScript.<\/p>\n\n

Some people prefer simpler or cleaner code or less \"visual debt\".<\/p>\n\n

I like the extra clarity that types add.<\/p>\n\n

I like to be able to read some code and immediately know what types things should be.<\/p>\n\n

I like the clearer errors and messages if a different type is given than was expected.<\/p>\n\n

Tools like PHPStan know more about my code and give better recommendations than if I don't add types.<\/p>\n\n

I like the better autocompletion I get when writing code that has types.<\/p>\n\n

I like types, but I also like the flexibility of whether or not to add them and for Developers and development teams to make their own decisions based on their preferences.<\/p>\n\n ", "summary": null } ], "feeds_item": [ { "imported": "1970-01-01T00:33:45+00:00", "guid": null, "hash": "c50e363614371738c421f8a32ee763f3", "target_type": "feeds_feed", "target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76" } ] }