[HN Gopher] This Month with Nim: March 2023
___________________________________________________________________
This Month with Nim: March 2023
Author : xigoi
Score : 42 points
Date : 2023-04-06 17:33 UTC (5 hours ago)
(HTM) web link (nim-lang.org)
(TXT) w3m dump (nim-lang.org)
| skerit wrote:
| What's up with all the 2-space indentations?
| schemescape wrote:
| I think Deno also standardized on two spaces for indents and I
| find that's not enough to be able to quickly identify the
| structure of code at a glance.
|
| Is Nim requiring this at build time? If so, that would be an
| odd choice for a language that goes out of its way to let
| people call functions, capitalize variables, and manage memory
| however they want.
| bobbylarrybobby wrote:
| I wonder why they used spaces at all. If they had used tabs,
| you could at least override the width with a userstyle
| extension using https://developer.mozilla.org/en-
| US/docs/web/css/tab-size
| otherme123 wrote:
| From NEP1:
|
| Spacing and Whitespace Conventions
|
| Lines should be no longer than 80 characters. Limiting the
| amount of information present on each line makes for more
| readable code - the reader has smaller chunks to process.
|
| Two spaces should be used for indentation of blocks; tabstops
| are not allowed (the compiler enforces this). Using spaces
| means that the appearance of code is more consistent across
| editors. Unlike spaces, tabstop width varies across editors,
| and not all editors provide means of changing this width.
| tangus wrote:
| What's the problem?
| tmountain wrote:
| To help save space on our 80 column CRT monitors? /s
| elcritch wrote:
| You jest, but I _do_ like to save space. If possible I like
| to have 2-3 editor columns which works well with Nim.
|
| This lets me have context of having a test file in one
| column, some code in another, and the core types in another
| say.
___________________________________________________________________
(page generated 2023-04-06 23:01 UTC)