C# vs. JavaScript/Typescript dyslexia
-
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#: 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 SubscriptionsI 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
-
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.
And there are new languages coming out every day!
Wear your mask! the life you save may be your own.
-
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 SubscriptionsIt 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.
-
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 SubscriptionsYes! I've been going through exactly this all week.
cheers Chris Maunder