Hacker News new | ask | show | jobs
by gloob 4813 days ago
I, too, feel that perfectly uniform brace positioning is one of the critical technical challenges facing any new language today. There is no longer any excuse to get such an important and fundamental advance wrong.
2 comments

Sarcasm?

It may not be a "critical technical challenge" but if you are writing a new language there is really no excuse to not cement things like that down before it is too late.

No no, give developers something cosmetic to argue about!

If you don't they'll find something fundamental to be dissatisfied with. E.g., the lack of full TCO or a Turing complete type system.

Why do you want to force people to use your style? That's pretty much against the hacker mindset.
>That's pretty much against the hacker mindset.

I see how you would think so, but I lean in the opposite direction. If all programs in X language are written in the same style, you never have to pause to think about how to style something. This also means that you can quickly read other programs without being thrown by differences in style, and it's a great use-case for a tool that does the formatting for you. You can just write a quick example, run the formatting tool, and you won't have to pause next time. If you really can't afford the interruption, you can just skip formatting and run the formatting tool later-- though this is the sort of use-case that only occurs early in your relationship with the language.

Why do you want to force people to whatever style you want to read in?

There is a strong case for having one style: namely that now it becomes easy to understand aspects of a program at a glance (e.g. structure of flow, where you can gloss over for now, and where you have complexity) and also helps identify errors and on right away. Sometimes it's imperfect, but consistency is more important than "looks pretty".

Besides, if we're talking about the hacker mindset:

1) there are other languages

2) you can do amazingly complex and deep things with your brain, but you can't adapt to a style?

3) consistency and correctness is more important than "what I whimsically decide is neat looking today, no matter how many errors it is hiding".

My style? Not my style, a style.

And there would be no "forced" unless the reference implementation were to error when un-standard styles were used. I see absolutely nothing particularly "un-hackerish" about this. We standardize syntax and keywords, why not syntactical style?

You know what does seem hackerish though? Having tools that do mundane tasks (for example, formatting) for you so that you don't have to. Lisp, and lisp pretty-printers, also strike me as pretty hackerish.

Hackers are about creating things.

Arguing about "using your own style" with regards to braces and such is not hacking, it's bike-shedding.

So suddenly you decide what hacking should mean to me?

Sorry, but this thread smells of authoritarian people. I'm not really compatible with that.

>So suddenly you decide what hacking should mean to me?

Did you start this sub-thread saying: "Why do you want to force people to use your style? That's pretty much against the hacker mindset", ie telling us what hacking should mean to us?

To answer your question: no.

I merely restated what hacking means for everybody. Words have meanings built-in, individuals don't get to decide "what it means to them" and have that be accepted by other people (Else why even use the common word in the first place? Invent your own).

So, if hacking means "no standard syntax rules" to you (among other things of course), that doesn't mean squat to the general hacking population. Guido Van Rossum, for example, is as much a hacker as anybody, as are Python users, hacking in a language where indenting is enforced.

"Bike-shedding" is also well known, and is well known that syntax-style, brace wars and such fall under bike-shedding and/or yak shaving in Hacker culture, along with Emacs/Vi etc.

>Sorry, but this thread smells of authoritarian people.

Yes. Either that or people who couldn't give a flying duck for brace/common style wars, and have found by experience that not arguing about such things and having language standards make them more productive.

People that know that your "rebellion" and "creativity" have millions of interesting avenues to be exhibiting in the things you CREATE with your code, instead of in your brace style and such.

It's as if saying "I cannot be creative in this company/school" because they have a dress code. As if wearing some lame t-shirt or whatever makes one more creative.

I hope I am detecting sarcasm. I say use whatever the consensus is, but TCO is a much bigger issue IMHO.