lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 18/09/2012 17:44, Sean Conner wrote:
Sometime, I dream of a language forcing to put whitespace around operators.
I believe it helps readability, and it would reduce or eliminate such
ambiguity...

   Python and Go are two notable languages that enforce (to differing
degrees) a certain coding style (Python with significant white space for
indenting, and Go with brace placement).  It's great if you agree with the
coding conventions; otherwise it's pure hell.

Well, if you don't like a language, don't use it... (unless your boss forces you, or that's the choice for scripting of your favorite program...).

But I don't know if it would be popular, some programmers like compact code
(or hate typing, but a good IDE can help here).

   And there are those of us who hate IDEs.  I, for one, have never liked
them, and the last time I tried one (Eclipse, last month) it would crash
when I atttempted to load an existing simple program (Eclipse---seriously?
You can't even deal with a two file, pre-existing program?).

I mentioned IDEs, but a good scriptable editor (like SciTE, my favorite, with Lua scripting) can help too.
I wrote small helper functions improving the style of the current line of Java code...
And personally, adding manually spaces around (most) operators (except parentheses, unlike ABAP...) is deeply ingrained in my fingers, so I type them without (almost) thinking.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --