logoalt Hacker News

fuzztesteryesterday at 3:45 PM1 replyview on HN

I don't get your 2nd sentence: "The difference in what I’ve used" ... Can you give an example, and name the language used?


Replies

chrisoverzeroyesterday at 9:33 PM

Sure! Let’s say I want to enforce that a variable only ever holds an integer. Rather than put the conventional prefix and the name together, like this:

    var intValue = 3;
…I separate the conventional prefix with a space:

    int value = 3;
…so now my co-workers don’t need to remember the convention – it’s enforced by the language.

(I hope this makes the joke more obvious.)

show 1 reply