Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
eldamir12297yPython: I'll hold your cup. If it turns out that is is not tea, I'll pour it on the floor and knock over a table, while I'm at it
-
I'm just starting to learn coding. I wanna take up JavaScript, so began with HTML & CSS. I also had considered C# a few weeks back. Can someone please explain me the above post...how it relates technically to those languages.
-
Me: Hold my cup of coffee
Assembly: 01001001 00100111 01101100 01101100 00100000 01101000 01101111 01101100 01100100 00100000 01111001 01101111 01110101 01110010 00100000 01100011 01110101 01110000 00100000 01101111 01100110 00100000 01100011 01101111 01100110 01100110 01100101 01100101 -
JavaScript: Hold my cup of tea.
TypeScript: That's not a cup of tea.
JavaScript: Hold my cup of tea. Please. Any.
TypeScript: As you wish. Any-thing you want. -
Well well well. You should obviously have said "Here, please hold my object of type ICup" and then C# wouldn't have cared what was in the cup...
Problem with Javascript is when you want the cup back. Then it's:
Me: "can I have it back now?"
Js: "You mean this?"
Js: hands over someone else's beer.. -
nicholai8937y@skanchan221 it doesn't. They just don't understand how JavaScript works.
Correctly written it should be:
Me: Hold my cup of tea
JavaScript: Okay, I'll hold your cup of tea, even though you designed me to hold coffee, you seem to be a dumbass and pass me tea, but I'll play nice and try and do the best I can without dying, despite your stupidity. -
@skanchan221 Google for "type safety" or "strongly typed vs weakly typed languages".
-
@filthyranter 010101110110010100100000010010110110111001101111011101110010000001010100011010000110000101110100
-
fykto577yMe: hold my cup of tea
C: *drops cup on the floor* "You should have told me it was scalding hot!"
...
Me: hold my cup of tea
Java: nope, I'm sorry. I only do coffee. -
CristCD2977yMe: Hold my cup of tea.
C: Ok.
...later...
Me: Give me mu cup of tea.
C: There's nothing here, but I'll leave you a core dumped and go take a nap. Call me later. -
Sorry to be pedantic, but why would I ever allow a cup of tea to leave my hand anyway?
-
@GrizzlyMagnum
Is a joke about the typed language.
In C# you have to declare what type your variable is. For example
int aNumber; this mean you can only save integer numbers in aNumber, if you try to save text in aNumber it will give you an error.
On the hand in js you just go
var aNumber; and then save in a number whatever you want. A String, a number, a function anything. -
@fioritonicolas True and a great explanation, but C# also supports `var` and `dynamic` types.
For me the most irritating thing about C# is that a control is still a control, no matter if it's a label or a button.
Also 1 == true, but 1!== true. C does it, JS does, PHP does it, but in C#, 1 != true. -
@DRSDavidSoft In C# "var" is not dynamic typing. It is just a way for the coder to omit writing out the exact type of a variable. Var is basically a placeholder, but its exact type is well defined at compile time, the compiler evaluates, what type it will be.
Last section:
C has no "boolean" type. JS and PHP do implicit type conversion to boolean, C# does not.
Because C# is strongly typed and in the case of integer and boolean has no implicit type conversion.
Related Rants
Difference between C# and Javascript
Me: Hold my cup of tea.
C#: That's not a cup of tea.
Me: Hold my cup of tea, with two teaspoons of sugar in it.
C#: That's not a cup of tea with two tea spoons of sugar in it.
Me: Hold my cup of tea, with two teaspoons of sugar and milk in it.
C#: That is not a cup of tea, with two teaspoons of sugar and milk it.
...
Me: Hold my cup of tea.
Javascript: I'll hold your cup of coffee.
undefined
c#
js