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: |

The main programming languages I write are PHP and JavaScript.

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.

Adding types is optional.

You don't need to add types to your PHP code, and you can choose to write plain JavaScript instead of TypeScript.

Some people prefer simpler or cleaner code or less "visual debt".

I like the extra clarity that types add.

I like to be able to read some code and immediately know what types things should be.

I like the clearer errors and messages if a different type is given than was expected.

Tools like PHPStan know more about my code and give better recommendations than if I don't add types.

I like the better autocompletion I get when writing code that has types.

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.

format: full_html processed: |

The main programming languages I write are PHP and JavaScript.

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.

Adding types is optional.

You don't need to add types to your PHP code, and you can choose to write plain JavaScript instead of TypeScript.

Some people prefer simpler or cleaner code or less "visual debt".

I like the extra clarity that types add.

I like to be able to read some code and immediately know what types things should be.

I like the clearer errors and messages if a different type is given than was expected.

Tools like PHPStan know more about my code and give better recommendations than if I don't add types.

I like the better autocompletion I get when writing code that has types.

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.

summary: null field_daily_email_cta: { }