Hacker News new | past | comments | ask | show | jobs | submit login

Am I the only one who is very confused by these examples?

A function named "frobulate" - what is frobulate? I dunno. The function calls: thingsToFrobulate, logit, cleanupOldest, processOld, doNewThing, cleanup and somehow FrobulatingMessage is set on the way.

Honestly; you can do the most clever functional programming in the world but if you naming is like this then your code is just going to be bananas.

And BTW: both Swift and Go are missing exceptions; I think those would be very helpful here.




frob is a https://en.wikipedia.org/wiki/Metasyntactic_variable , but not a "common one" which may have led to your confusion.


Ok. Maybe I am not getting the joke then. So thingsToFrobulate, logit, cleanupOldest, processOld, doNewThing, cleanup and FrobulatingMessage are "metasyntactic variables" too?


It just comes down to a habit of giving a name to something as an example of something that isn't meant to map to any problem domain. E.g. when a manufacturer is in the business of making "widgets," we know they're not actually making products that are widgets (whatever those are.)

Once you know that the names being used are not considered to be "important", the other names aren't as important as well, only the syntax. These metasyntactic variables are useful for avoiding situations like "Who's on First?" (e.g. https://www.youtube.com/watch?v=kTcRRaXV-fg ) which is humorous to native-English speakers, but probably incoherent to non-native English speakers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: