Hacker News new | ask | show | jobs
by camgunz 3326 days ago
They're different ways of programming -- it's where you spend your brain power. You can see codebases that weren't built in IDEs: they generally don't have strong naming conventions in their classes/structures/functions.

One of my hobby projects is in C, and I prefer using an editor to an IDE. Because of an accident of history, public methods tend to be named like `P_PlayerCommandRead`, where `P` means (generally) "physics", and `Player` and `Command` are essentially nested namespaces. I specifically name things this way so that I can type them quickly without spending a lot of brain cycles on figuring out the scopes.

I'm not saying code bases built with IDEs don't have consistent naming, or that code bases built without IDEs have hellish homegrown naming. But it's kind of a "how you grew up" thing, and it latches onto a lot of underlying feelings you have about coding in general.

1 comments

More recently I've come to the conclusion that most of naming must be influenced by "how you grew up". As someone who has mostly touched the Java and Python ecosystems while learning to program, I frequently run into names that seem "weird" to me, because they replace often-used technical words (from those ecosystems) through more obscure synonyms.

C++ also often had that (replacing 'map' through 'transform' and so on) - but since it's a standard, at least it is usually more consistent in its own internal logic. Same goes e.g. for LINQ, which was influenced by SQL instead of LISP-like collection transformation functions.

> Same goes e.g. for LINQ, which was influenced by SQL instead of LISP-like collection transformation functions.

This was an explicit decision to make functional programming more palatable to mainstream developers.

Have you read the paper from Erik Meijer?

It's pretty obvious that this was a conscious decision. And it makes a lot of sense too, if you think of Microsoft's target audience.

But still - if you're used to the functional "default" naming schema (which mostly comes from math, anyway), it's nontheless something that can be a bit irritating (especially since there's also the "inline SQL syntax" you could use alternatively).

It definitely is. I started with C++, and at some point I found my way to Common Lisp. At first I was surprised at how many weird names the latter has... and then I got used to them, started to like them, and now I shake my head when I see new languages inventing new names for things that had a perfectly good Lisp name already, probably because they didn't know the concept had already existed for 50+ years...