News for hackers. Stuff that matters.
Re:What's the deal with tab size (8 spaces) in the GitHub UI? by sk0g on Monday September 20, 2021 @09:39PM (#28601176)
That's all well and good for Linux-style C programming maybe, but it would be painful in languages like C#.

EG the simplest function in a Unity game, that prints "hello world" for the player only would be something like:

  namespace Something 
  {
          class SomeClass 
          {
                  void Awake()
                  {
                          if (CompareTag("Player"))
                          {
                                  print("Hello, world")
                                  print("This line's closing bracket is at # 80")
                          }
                  }
          }
  }
Re:What's the deal with tab size (8 spaces) in the GitHub UI? by catmanjan on Monday September 20, 2021 @10:03PM (#28601297)
The new C# 6 templates don't require namespace or class blocks - for this reason I suppose.
Re:What's the deal with tab size (8 spaces) in the GitHub UI? by fingerlocks on Monday September 20, 2021 @10:11PM (#28601350)
Pretty much every language with a class that contains a function with a loop that breaks on an inner condition would be 4 levels deep. I suppose Objective-C would only be 3 deep, but I can't think of any others off the top of head.
Re:What's the deal with tab size (8 spaces) in the GitHub UI? by kragen on Monday September 20, 2021 @11:01PM (#28601665)
2 levels in Smalltalk, unless I'm missing something?

    !SomeClass methodsFor: ''something'' stamp: ''kks 6/30/2018 16:11''!
    find: key
            1 to: self items length do: [:i |
                    (key = self keys at: i) ifTrue: [^i]
            ]
    ! !
Re:What's the deal with tab size (8 spaces) in the GitHub UI? by Cyph0n on Monday September 20, 2021 @10:55PM (#28601619)
C++, if the method is implemented outside of its header file.
Re:What's the deal with tab size (8 spaces) in the GitHub UI? by sk0g on Monday September 20, 2021 @10:11PM (#28601348)
I do like having the namespace there, if only to gently nudge you towards better architecture.

As a temp fix I have overridden Rider's code formatting to not indent within the namespace, but C# 10 will bring file scoped namespaces. You can just declare the namespace between the imports and the classes, and everything in the file will be namespaced automatically.