11

!Rant

.net 6 + c# 10 is a blast to work with !

I double dare you to create hello world with less lines :) (It's actually 1 line in .net 6)

Comments
  • 5
    @jespersh Well, that’s their « demo » for c#10. If you start touching it, you will need to reintroduce program class.
    But there are really nice things.
    For example, we used to write :
    Namespace bla {
    code
    }

    Now it’s
    Namespace bla;
    Code.

    1 tab (or 4 spaces) won per line in the file. Because I never in my life saw 2 different namespaces in the same file.
    Global usings : NOICE ! I put System, System.Text, LinQ etc in a global usings file, no need to import them in every class.
    (I joined c# dev around .net 1.1, but it was LinQ introduction what convinced me to go 100% c# vs Java or C++)
  • 1
    Implicit main was around in 9, I think.

    The flat namespace declaration is cool, though, looks like the flattened using.
  • 2
    A hello world in one line? Scheme, Common Lisp, Perl, Python, Ruby, JS, PHP, Bash,powershell and the list goes on my G, but I do like .net so rock on!
  • 0
    so...
    python/javascript?

    alrighty then.
  • 0
    // Program.fs
    printfn "Hello, World!"
Add Comment