Hacker News new | ask | show | jobs
by 628C6l0 2922 days ago
Emojis make your code a little more like math formulas. In math formulas you use single letters. This makes the syntax easy to parse, but has the drawback that the letters are mostly meaningless and so not very suggestive. Names in programming language tend to be words. This makes it easier to remember what they are supposed to stand for but also make the syntax hard to parse and other occurrences hard to spot

Emojis combine the best of both worlds. Like the letters used in math they are easy to parse and it's really easy to find other occurrences of the same var when the name is an apple . But like the more verbose names in programming languages they can carry meaning. Eg I use the dango emoji for arrays and the monitor emoji for window instances.

3 comments

Dango would be more appropriate for a dequeue, as it's not random access - you can only remove pieces from either end of the skewer. The bento box makes more sense for an array, because you can pick from any compartment.

Pancakes for a stack, popcorn for a heap, burrito for a monad.

So... just to be clear... you're serious...? I smell a clever troll.
Ah yes, because nothing says “data structure consisting of a contiguous block of memory broken into uniformly sized chunks so elements can be cheaply accessed by index” like a little picture of rice dumplings on a stick. Much better than just using the accepted technical term “array”.

Personally I prefer the abbreviation arrr, or sometimes yarr. Lets anyone reading the code feel like they just downed a pitcher of grog.

I see you’re a beta tester for Pyrate, the super-secret code name for Python4.

!Arrrr[g]