[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: MoonScript, a language that compiles to Lua
- From: HyperHacker <hyperhacker@...>
- Date: Fri, 12 Aug 2011 03:46:13 -0600
On Fri, Aug 12, 2011 at 00:36, Axel Kittenberger <axkibe@gmail.com> wrote:
>> Except it forces indentation and structure in cases where it's not
>> entirely necessary. I like being able to write:
>> if x then doThings(x) else doThings(y) end
>> instead of:
>> if x then
>> doThings(x)
>> else
>> doThings(y)
>
> Did you actually work with any significant whitespace language? E.g.
> in python both work very well. You can always write all things in one
> line if you want to.
>
> What you just cannot do is:
>
> if x then
> doThings(x)
> else
> doThings(y)
>
>
I did work with Python a bit a while back. Perhaps I just forgot it
accepted that...
On Fri, Aug 12, 2011 at 03:39, Miles Bader <miles@gnu.org> wrote:
> oliver <oliver.schoenborn@gmail.com> writes:
>>> > I'm a Lua guy, but I prefer locals by default and grouping by
>>> > indentation, if I had my druthers (which of course I never will).
>>> > Here's why I prefer grouping by indentation:
>>>
>>> Indeed, those features are perfect for trivially tiny example
>>> programs ... :]
>>
>> Actually, trivially tiny example programs are the only place that
>> unindented code makes sense.
>
> Sure, but my point has nothing to do with "unindented code" though.
> My point is that using explicit delimiters _as well_ as good
> indentation helps readability in real code. Indentation is obviously
> important, but it's really not sufficient. Some redundancy is _good_.
>
> [I do think it's nice to have a way of avoiding end-delimiters for
> "very short" blocks -- one-liners and the like]
>
> -Miles
>
> --
> Accordion, n. An instrument in harmony with the sentiments of an assassin.
>
>
Perhaps this is a better job for a tool that simply analyzes your code
for stylistic things like indentation and sane variable names. I'm
pretty sure that process is called linting, but it's too late at night
to trust my brain. :)
--
Sent from my toaster.
- References:
- MoonScript, a language that compiles to Lua, leaf corcoran
- Re: MoonScript, a language that compiles to Lua, steve donovan
- Re: MoonScript, a language that compiles to Lua, Miles Bader
- Re: MoonScript, a language that compiles to Lua, Steve Litt
- Re: MoonScript, a language that compiles to Lua, Miles Bader
- Re: MoonScript, a language that compiles to Lua, oliver
- Re: MoonScript, a language that compiles to Lua, Miles Bader