
Ask HN: Are programmers afraid of new syntax? - rs86
I see many developers and companies adopt Elixir because &quot;it looks like Ruby&quot; but the two languages could not be more different. Why do programmers car so much about syntax?
======
nostrademons
It's not so much that they're afraid of it, it's that changing syntax imposes
a mental tax on them for no reason. Once you've been programming in a language
for more than a few months, you no longer think in terms of tokens. Rather,
your muscle memory now has constructs for "This is what a variable binding
looks like. This is what a for-each loop looks like. This is what a method
call looks like," and you can just think in terms of the desired semantics
rather than how to type that into an editor.

A language with a new and unfamiliar syntax requires that you unlearn all
these key-bindings and start thinking on the level of tokens again. It's
understandable that given the choice, people who have already graduated from
this stage would rather not repeat it.

~~~
rs86
That makes them look like glorified cybernetic factory workers

~~~
WingH
On the other hand, spending most of your time learning new syntax as opposed
to actually solving creative problems makes one more like a glorified factory
worker.

~~~
rs86
Learning syntax is a non problem

~~~
nostrademons
...that's generally a waste of time.

Once people graduate from the "I'm going to learn ALL the things because it's
fun and I got surplus brainpower", they usually discover that there are lots
and lots of problems out there that require plenty of brainpower _and people
will actually pay you for solving_. It's somewhat silly to allocate your
mental effort to things that get you nothing but intellectual gratification
when you can allocate it to things that get you intellectual gratification
_and monetary compensation that will let you do many things you otherwise can
't_.

~~~
AnimalMuppet
Exactly. I can learn syntax _if it 's going to pay me back for the effort_ \-
if it's going to enable me to avoid bugs, or to solve problems I couldn't, or
to be more productive, or to get or keep a job.

Learning syntax that isn't going to pay me back? I don't have time for that.

~~~
rs86
It takes half an hour to learn syntax

~~~
AnimalMuppet
It takes a lot longer to learn syntax _to the point where I don 't have to
think about it_, so that I can spend my time thinking about the problem
instead.

Having to think about the syntax is like not being a touch typist. Sure, I can
still press the right keys, but I have to think about doing so, which slows me
down and takes my thinking off of what I'm trying to say.

~~~
rs86
But does coding take more time typing rather than thinking?

~~~
nostrademons
You've answered your own question about why programmers don't like new syntax.
Because most (interesting) coding takes more time thinking than typing,
_syntax is only a cost, never a benefit_. If your language has familiar
syntax, then they don't have to pay that cost. If it makes them learn new
syntax, it better provide _other_ benefits like access to a new platform, a
job that pays much better, or eliminating a large class of bugs. And if two
languages both offer that same benefit (like Erlang vs. Elixir, Matlab vs.
Python, even Python/Ruby vs. Node.js) programmers will gravitate toward the
one that doesn't make them learn new syntax.

~~~
rs86
People think haskell's or lisp's syntax is bad, but they bring awesome power
to solve problems. They are the best languages.

~~~
mattmanser
(Something (a (small (set (of)) (((programmers have (been claiming) for)
decades)) and yet) somehow they never, ever, take) off.))) ((I wonder) (why)
that is))))?

The kind of problems that they help with are actually fairly rare, while their
disadvantages are expensive. Basically the syntax sucks and all the really
useful bits are now in all the other languages any way.

------
codeonfire
No, but there is a "not this shit again" attitude. Over the last 50 years it
has been done. Most of the time people with a new syntax also have stupid
names for already agreed upon constructs and ideas. Those people are trying
too hard to be different. Maybe one language uses ->, another uses =>, so Joe
Language programmer is going to use <!@==>>>. But no one is going to type
<!@==>>>, so the language fails. Joe exits programming and there are 10,000
dead computer languages with worthless syntax that didn't help people write
software better.

------
andrewmcwatters
The older I get, the slower I feel. Projects seem to need more planning and I
wish I was more spontaneous, but I realize documentation is important, or
testing needs to be done, or branding should be polished up. Syntax is a small
part of software development, but it's everywhere. I need to be productive,
and I just don't want to be on this hamster wheel when I'm just trying to get
something shipped to developers and users, which is hard enough on its own.

------
quickthrower2
I've got used to polyglotting and constantly getting things wrong syntax
wise!. When I'm editing a C#, a SQL, then a coffee script then a type script,
then get home and write some Elm, things will get confusing!

------
mbiondi
Learning new things is hard.

