Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. C# vs. JavaScript/Typescript dyslexia

C# vs. JavaScript/Typescript dyslexia

Scheduled Pinned Locked Moved The Lounge
javascriptcsharpvisual-studiocom
25 Posts 16 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Marc Clifton

    C#: var foo = "foo"; JS: let foo = "foo"; or: let foo = 'foo'; C#: var s = $"Foo = {foo}"; JS: let s = Foo = `${foo}`; C#: int Fnc(string a) TS: fnc(a: string): number C#: braces are on separate lines JS: opening brace is on the same line. C#: if (!String.IsNullOrEmpty(foo)) JS: if (foo) C#: Reverse(foo); JS: this.reverse(foo); or even worse: this.reverse(this.foo); Half the time I wrote the wrong syntax for the wrong language. :rolleyes:

    Latest Articles:
    Client-Side Type-Based Publisher/Subscriber, Exploring Synchronous, "Event-ed", and Worker Thread Subscriptions

    T Offline
    T Offline
    the Kris
    wrote on last edited by
    #21

    Marc Clifton wrote:

    C#: if (!String.IsNullOrEmpty(foo)) JS: if (foo)

    Those two are not the same. Consider foo = "0";

    1 Reply Last reply
    0
    • M Marc Clifton

      C#: var foo = "foo"; JS: let foo = "foo"; or: let foo = 'foo'; C#: var s = $"Foo = {foo}"; JS: let s = Foo = `${foo}`; C#: int Fnc(string a) TS: fnc(a: string): number C#: braces are on separate lines JS: opening brace is on the same line. C#: if (!String.IsNullOrEmpty(foo)) JS: if (foo) C#: Reverse(foo); JS: this.reverse(foo); or even worse: this.reverse(this.foo); Half the time I wrote the wrong syntax for the wrong language. :rolleyes:

      Latest Articles:
      Client-Side Type-Based Publisher/Subscriber, Exploring Synchronous, "Event-ed", and Worker Thread Subscriptions

      D Offline
      D Offline
      den2k88
      wrote on last edited by
      #22

      I sometimes still type 'Dim i as Long' in C. VB is the computer science equivalent to Saigon.

      GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

      1 Reply Last reply
      0
      • L Lost User

        There was a time when i could write Univac assembler code with only minimal reference to the OS reference manual. Modern languages are now so feature rich you need the SDK reference almost every few lines. Or maybe I am just not very good at it.

        S Offline
        S Offline
        Slow Eddie
        wrote on last edited by
        #23

        And there are new languages coming out every day!

        Wear your mask! the life you save may be your own.

        1 Reply Last reply
        0
        • M Marc Clifton

          C#: var foo = "foo"; JS: let foo = "foo"; or: let foo = 'foo'; C#: var s = $"Foo = {foo}"; JS: let s = Foo = `${foo}`; C#: int Fnc(string a) TS: fnc(a: string): number C#: braces are on separate lines JS: opening brace is on the same line. C#: if (!String.IsNullOrEmpty(foo)) JS: if (foo) C#: Reverse(foo); JS: this.reverse(foo); or even worse: this.reverse(this.foo); Half the time I wrote the wrong syntax for the wrong language. :rolleyes:

          Latest Articles:
          Client-Side Type-Based Publisher/Subscriber, Exploring Synchronous, "Event-ed", and Worker Thread Subscriptions

          M Offline
          M Offline
          michaelbarb
          wrote on last edited by
          #24

          It is a mental discipline of learning how to forget. I have only half way mastered it.

          So many years of programming I have forgotten more languages than I know.

          1 Reply Last reply
          0
          • M Marc Clifton

            C#: var foo = "foo"; JS: let foo = "foo"; or: let foo = 'foo'; C#: var s = $"Foo = {foo}"; JS: let s = Foo = `${foo}`; C#: int Fnc(string a) TS: fnc(a: string): number C#: braces are on separate lines JS: opening brace is on the same line. C#: if (!String.IsNullOrEmpty(foo)) JS: if (foo) C#: Reverse(foo); JS: this.reverse(foo); or even worse: this.reverse(this.foo); Half the time I wrote the wrong syntax for the wrong language. :rolleyes:

            Latest Articles:
            Client-Side Type-Based Publisher/Subscriber, Exploring Synchronous, "Event-ed", and Worker Thread Subscriptions

            C Offline
            C Offline
            Chris Maunder
            wrote on last edited by
            #25

            Yes! I've been going through exactly this all week.

            cheers Chris Maunder

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups