Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Kodak the toilet scrubber

Name: Anonymous 2022-10-31 22:46

scrub another toilet ooniichan

Name: Navy Recruiting Office 2022-11-01 3:57

Join the Navy and scrub the world!

Name: Anonymous 2022-11-01 7:34

Hold it there Kodak!

Name: The Type System 2022-11-02 4:16

The type system is a programmer's best friend

I am tired of primitive obsession and the excessive use of primitive types to model a domain.

A string value is not a great type to convey a user's email address or their country of origin. These values deserve much richer and dedicated types. I want a data type called EmailAddress which cannot be null. I want a single point of entry to create a new object of that type. It should get validated and normalised before returning a new value. I want that data type to have helpful methods such as .Domain() or .NonAliasValue() which would return gmail.com and foo@gmail.com respectively for an input of foo+bar@gmail.com. Such useful functionality should be embedded into those types. It provides safety, helps to prevent bugs and it immensely increases maintainability.

https://dusted.codes/the-type-system-is-a-programmers-best-friend

conipto 837 points 12 hours ago

Compile time errors are better than runtime errors.

Change my mind.

grelphy 47 points 3 hours ago

Earlier failures are always preferable. Compile time is better than runtime. Initialization is better than mid-execution. Barfing on ingesting bad data is better than barfing on retrieving it from storage. Et cetera.

The number of people who will agree with "fail early" as a principle and then evangelize unityped languages is baffling to me.

https://old.reddit.com/r/programming/comments/yj5mbd/the_type_system_is_a_programmers_best_friend

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List